aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-10-08 12:36:54 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-08 12:36:54 -0700
commitac211af359667dd1afcc375e688c3aae46cb13e8 (patch)
treed8596f53f52fd6522d4190bc25f43eb5ac427e8a /include/gpu
parent81e64484ff801ad2c346722e41a3f4216a15b6c8 (diff)
call derived ~ from GrIORef
TBR=mtklein@google.com NOTREECHECKS=true Review URL: https://codereview.chromium.org/641813002
Diffstat (limited to 'include/gpu')
-rw-r--r--include/gpu/GrGpuResource.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/gpu/GrGpuResource.h b/include/gpu/GrGpuResource.h
index 666ab0d3b6..00a5035107 100644
--- a/include/gpu/GrGpuResource.h
+++ b/include/gpu/GrGpuResource.h
@@ -103,7 +103,8 @@ private:
void didUnref() const {
if (0 == fPendingReads && 0 == fPendingWrites) {
if (0 == fRefCnt) {
- SkDELETE(this);
+ // Must call derived destructor since this is not a virtual class.
+ SkDELETE(static_cast<const DERIVED*>(this));
} else if (1 == fRefCnt) {
// The one ref is the cache's
static_cast<const DERIVED*>(this)->notifyIsPurgable();