aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2014-06-02 07:53:01 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-06-02 07:53:01 -0700
commit0d03db7446126be6ccce744be9b37ef475142e16 (patch)
tree6030bcb3521fbbc657e93cf4b6e0fc9c07f806e0
parent9c0e629c64c0fa93ac9bf5c2eaa1821370a6fbe5 (diff)
Clean up SkLazyPtrs only in SK_DEVELOPER mode.
Checking only SK_DEBUG may make SkLazyPtr too anal about leaks for clients. Still working through strange leak problems inside Skia tests, so it's probably premature to turn it on in Chrome tests. BUG=379570 R=reed@google.com, mtklein@google.com, bungeman@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/308003014
-rw-r--r--src/core/SkLazyPtr.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/SkLazyPtr.h b/src/core/SkLazyPtr.h
index 515086876c..71876e7b41 100644
--- a/src/core/SkLazyPtr.h
+++ b/src/core/SkLazyPtr.h
@@ -97,7 +97,7 @@ public:
return ptr ? ptr : try_cas<T*, Destroy>(&fPtr, Create());
}
-#ifdef SK_DEBUG
+#ifdef SK_DEVELOPER
// FIXME: We know we leak refs on some classes. For now, let them leak.
void cleanup(SkFontConfigInterface*) {}
void cleanup(SkTypeface*) {}
@@ -125,7 +125,7 @@ public:
return ptr ? ptr : try_cas<T*, Destroy>(&fArray[i], Create(i));
}
-#ifdef SK_DEBUG
+#ifdef SK_DEVELOPER
~SkLazyPtrArray() {
for (int i = 0; i < N; i++) {
Destroy((T*)fArray[i]);