Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(605)

Unified Diff: gm/imagefiltersclipped.cpp

Issue 146193004: Fix memory leak in imagefiltersclipped GM (found by valgrind). (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imagefiltersclipped.cpp
diff --git a/gm/imagefiltersclipped.cpp b/gm/imagefiltersclipped.cpp
index 514fc203638b488b52b61fc4db2052bc388b1b30..82873ab3729df60748218dd288d25f9b9b7f92bf 100644
--- a/gm/imagefiltersclipped.cpp
+++ b/gm/imagefiltersclipped.cpp
@@ -126,6 +126,10 @@ protected:
canvas->restore();
canvas->translate(0, r.height() + margin);
}
+
+ for (size_t i = 0; i < SK_ARRAY_COUNT(filters); ++i) {
+ SkSafeUnref(filters[i]);
+ }
}
private:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698