SkOnce: add option to call another cleanup function once at exit.
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 24 Jan 2014 22:38:39 +0000 (22:38 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 24 Jan 2014 22:38:39 +0000 (22:38 +0000)
commit709ca75f032d7c60eb53c5840524a875a3a6cdb1
tree0e9d511e02bdcf5e1ef443b7fac4c8e8694092a4
parent3a9ade7f37a819c3290f5a668bb11c5e61bfa93f
SkOnce: add option to call another cleanup function once at exit.

Use this to clean up empty SkData and SkPathRef.

Current leaks:
  Leaked SkRefCntBase: 40
     Leaked SkFlattenable: 32
         Leaked SkPixelRef: 32
             Leaked SkMallocPixelRef: 32
     Leaked SkFontConfigInterface: 1
     Leaked SkWeakRefCnt: 1
         Leaked SkTypeface: 1
     Leaked SkFontMgr: 1
     Leaked SkDataTable: 3
     Leaked SkImage: 1
         Leaked ???: 1
     Leaked ???: 1

BUG=skia:
R=halcanary@google.com, reed@google.com

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/132803005

git-svn-id: http://skia.googlecode.com/svn/trunk@13180 2bbb7eff-a529-9590-31e7-b0007b416f81
include/core/SkData.h
include/core/SkOnce.h
include/core/SkPathRef.h
src/core/SkData.cpp
src/core/SkPathRef.cpp
src/core/SkScaledImageCache.cpp
tests/CachedDecodingPixelRefTest.cpp
tests/OnceTest.cpp