aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-31 19:23:02 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-31 19:23:02 +0000
commit622a17091b69df8d54d318c88f34851677a6d9c2 (patch)
treee9cf15c0b88a2b5959b31994bd968c138d41b9bb /samplecode
parent641f8b19a6799b6d73ac17b9c2d2f8a5e6f5ad4d (diff)
Fixed minor memory leaks
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/SampleDecode.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/samplecode/SampleDecode.cpp b/samplecode/SampleDecode.cpp
index 9188257b2d..fa2b72718a 100644
--- a/samplecode/SampleDecode.cpp
+++ b/samplecode/SampleDecode.cpp
@@ -27,7 +27,7 @@ class DecodeView : public SkView {
public:
SkBitmap fBitmap[SK_ARRAY_COUNT(gRec)];
- DecodeView() {
+ DecodeView() {
SkFILEStream stream("/skimages/index.png");
SkImageDecoder* codec = SkImageDecoder::Factory(&stream);
if (codec) {
@@ -37,6 +37,7 @@ public:
codec->decode(&stream, &fBitmap[i], gRec[i].fPrefConfig,
SkImageDecoder::kDecodePixels_Mode);
}
+ SkDELETE(codec);
}
}