From: mtklein Date: Mon, 2 Jun 2014 14:53:01 +0000 (-0700) Subject: Clean up SkLazyPtrs only in SK_DEVELOPER mode. X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~7438 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d03db7446126be6ccce744be9b37ef475142e16;p=platform%2Fupstream%2FlibSkiaSharp.git 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 --- 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]);