From 7816a4e840d7b5703d8b90731f80c2d88170d7f9 Mon Sep 17 00:00:00 2001 From: "tomhudson@google.com" Date: Thu, 15 Mar 2012 13:39:51 +0000 Subject: 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 --- gm/gmmain.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gm/gmmain.cpp') diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp index 523faf811d..6f53ce8f7b 100644 --- a/gm/gmmain.cpp +++ b/gm/gmmain.cpp @@ -728,6 +728,9 @@ int main(int argc, char * const argv[]) { 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 glContext; -- cgit v1.2.3