diff options
author | bsalomon <bsalomon@google.com> | 2014-11-20 08:02:46 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-20 08:02:46 -0800 |
commit | 072803144a623f1a59eb73ca5f3ddf45222b5e06 (patch) | |
tree | ea7fb517ab3948a6d60f315ee92b6ec92f88b49a /include/core/SkTextBlob.h | |
parent | 7cc1a34fbf5506e3a9e6834f0dcd988aa7c94084 (diff) |
Stop overloading internal_dispose in SkTextBlob and SkData
Review URL: https://codereview.chromium.org/737093002
Diffstat (limited to 'include/core/SkTextBlob.h')
-rw-r--r-- | include/core/SkTextBlob.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/core/SkTextBlob.h b/include/core/SkTextBlob.h index 8ee1d19196..334cfb98c4 100644 --- a/include/core/SkTextBlob.h +++ b/include/core/SkTextBlob.h @@ -79,7 +79,15 @@ private: SkTextBlob(int runCount, const SkRect& bounds); virtual ~SkTextBlob(); - virtual void internal_dispose() const SK_OVERRIDE; + + // Memory for objects of this class is created with sk_malloc rather than operator new and must + // be freed with sk_free. + void operator delete(void* p) { sk_free(p); } + void* operator new(size_t) { + SkFAIL("All blobs are created by placement new."); + return sk_malloc_throw(0); + } + void* operator new(size_t, void* p) { return p; } static unsigned ScalarsPerGlyph(GlyphPositioning pos); |