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

Unified Diff: src/lazy/SkDiscardablePixelRef.cpp

Issue 114673002: be sure to unlock the discardablememory before deleting it (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | « src/lazy/SkDiscardableMemoryPool.cpp ('k') | tests/CachedDecodingPixelRefTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lazy/SkDiscardablePixelRef.cpp
diff --git a/src/lazy/SkDiscardablePixelRef.cpp b/src/lazy/SkDiscardablePixelRef.cpp
index 6a9507c8c76a713bba3c7a85388e3f8e4c78d702..0b193ade3c35d234fa08b35aacf06e41bcfb4e89 100644
--- a/src/lazy/SkDiscardablePixelRef.cpp
+++ b/src/lazy/SkDiscardablePixelRef.cpp
@@ -30,6 +30,9 @@ SkDiscardablePixelRef::SkDiscardablePixelRef(SkImageGenerator* generator,
}
SkDiscardablePixelRef::~SkDiscardablePixelRef() {
+ if (this->isLocked()) {
+ fDiscardableMemory->unlock();
+ }
SkDELETE(fDiscardableMemory);
SkSafeUnref(fDMFactory);
SkDELETE(fGenerator);
« no previous file with comments | « src/lazy/SkDiscardableMemoryPool.cpp ('k') | tests/CachedDecodingPixelRefTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698