aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/gmmain.cpp
diff options
context:
space:
mode:
authorGravatar tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-03-15 13:39:51 +0000
committerGravatar tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-03-15 13:39:51 +0000
commit7816a4e840d7b5703d8b90731f80c2d88170d7f9 (patch)
treead41b8e852ba9d9c0d7c77573dd2370c559953c6 /gm/gmmain.cpp
parent601d312bd4a894cb6e981a9dfdc644288f3a4d47 (diff)
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
Diffstat (limited to 'gm/gmmain.cpp')
-rw-r--r--gm/gmmain.cpp3
1 files changed, 3 insertions, 0 deletions
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<SkGLContext> glContext;