Index: src/core/SkLiteDL.cpp |
diff --git a/src/core/SkLiteDL.cpp b/src/core/SkLiteDL.cpp |
index 778f5c9563c73adf1165166715ba9499aed26af9..329edb046b30b819cedf562e086dd51747cc6016 100644 |
--- a/src/core/SkLiteDL.cpp |
+++ b/src/core/SkLiteDL.cpp |
@@ -711,3 +711,12 @@ void SkLiteDL::internal_dispose() const { |
delete this; |
} |
+ |
+void SkLiteDL::PurgeFreelist() { |
+ SkAutoMutexAcquire lock(gFreeStackLock); |
+ while (gFreeStack) { |
+ SkLiteDL* top = gFreeStack; |
+ gFreeStack = gFreeStack->fNext; |
+ delete top; // Calling unref() here would just put it back on the list! |
+ } |
+} |