commit | cdb426d55a4bc4dae4f6d4f23e6994762950fdc3 | [log] [tgz] |
---|---|---|
author | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | Mon Sep 24 19:33:59 2012 +0000 |
committer | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | Mon Sep 24 19:33:59 2012 +0000 |
tree | e9263acd0914dc74e14d427d5cf846f1ab8a3878 | |
parent | 5b5bba36dcbc69b0033c2acc9981734956394816 [diff] [blame] |
Fix for GrTextureStripAtlas memory leak https://codereview.appspot.com/6549050/ git-svn-id: http://skia.googlecode.com/svn/trunk@5648 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index 05ca687..f35e729 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp
@@ -88,6 +88,10 @@ } GrContext::~GrContext() { + for (int i = 0; i < fCleanUpData.count(); ++i) { + (*fCleanUpData[i].fFunc)(this, fCleanUpData[i].fInfo); + } + this->flush(); // Since the gpu can hold scratch textures, give it a chance to let go