From ac211af359667dd1afcc375e688c3aae46cb13e8 Mon Sep 17 00:00:00 2001 From: bsalomon Date: Wed, 8 Oct 2014 12:36:54 -0700 Subject: call derived ~ from GrIORef TBR=mtklein@google.com NOTREECHECKS=true Review URL: https://codereview.chromium.org/641813002 --- include/gpu/GrGpuResource.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/gpu') 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(this)); } else if (1 == fRefCnt) { // The one ref is the cache's static_cast(this)->notifyIsPurgable(); -- cgit v1.2.3