From 0d03db7446126be6ccce744be9b37ef475142e16 Mon Sep 17 00:00:00 2001 From: mtklein Date: Mon, 2 Jun 2014 07:53:01 -0700 Subject: [PATCH] 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 --- src/core/SkLazyPtr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/SkLazyPtr.h b/src/core/SkLazyPtr.h index 5150868..71876e7 100644 --- a/src/core/SkLazyPtr.h +++ b/src/core/SkLazyPtr.h @@ -97,7 +97,7 @@ public: return ptr ? ptr : try_cas(&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(&fArray[i], Create(i)); } -#ifdef SK_DEBUG +#ifdef SK_DEVELOPER ~SkLazyPtrArray() { for (int i = 0; i < N; i++) { Destroy((T*)fArray[i]); -- 2.7.4