Index: src/core/SkData.cpp |
diff --git a/src/core/SkData.cpp b/src/core/SkData.cpp |
index c5d10775f8024cad028c69dbb7e107325c157586..dfbd00384975d93a622c7eabeccfaf5d8b091bd0 100644 |
--- a/src/core/SkData.cpp |
+++ b/src/core/SkData.cpp |
@@ -12,11 +12,6 @@ |
#include "SkStream.h" |
#include "SkWriteBuffer.h" |
-static void sk_inplace_sentinel_releaseproc(const void*, size_t, void*) { |
- // we should never get called, as we are just a sentinel |
- sk_throw(); |
-} |
- |
SkData::SkData(const void* ptr, size_t size, ReleaseProc proc, void* context) { |
fPtr = const_cast<void*>(ptr); |
fSize = size; |
@@ -31,7 +26,7 @@ SkData::SkData(const void* ptr, size_t size, ReleaseProc proc, void* context) { |
SkData::SkData(size_t size) { |
fPtr = (char*)(this + 1); // contents are immediately after this |
fSize = size; |
- fReleaseProc = sk_inplace_sentinel_releaseproc; |
+ fReleaseProc = NULL; |
fReleaseProcContext = NULL; |
} |
@@ -41,20 +36,6 @@ SkData::~SkData() { |
} |
} |
-void SkData::internal_dispose() const { |
- if (sk_inplace_sentinel_releaseproc == fReleaseProc) { |
- const_cast<SkData*>(this)->fReleaseProc = NULL; // so we don't call it in our destructor |
- |
- this->internal_dispose_restore_refcnt_to_1(); |
- this->~SkData(); // explicitly call this for refcnt bookkeeping |
- |
- sk_free(const_cast<SkData*>(this)); |
- } else { |
- this->internal_dispose_restore_refcnt_to_1(); |
- SkDELETE(this); |
- } |
-} |
- |
bool SkData::equals(const SkData* other) const { |
if (NULL == other) { |
return false; |