Close an (incidental) memory leak in gmmain.
Create a suppressions file for gm so that valgrind doesn't warn about
dubious actions the driver takes. There *may* be one of those that we
could do something about...
http://codereview.appspot.com/5820056/
git-svn-id: http://skia.googlecode.com/svn/trunk@3396 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index 523faf8..6f53ce8 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -728,6 +728,9 @@
SkISize size = gm->getISize();
maxW = SkMax32(size.width(), maxW);
maxH = SkMax32(size.height(), maxH);
+ // This fixes a memory leak, but we are churning gms; we could
+ // instead cache them if we have constructors with side-effects.
+ SkDELETE(gm);
}
// setup a GL context for drawing offscreen
SkAutoTUnref<SkGLContext> glContext;