From: bsalomon Date: Wed, 8 Oct 2014 19:36:54 +0000 (-0700) Subject: call derived ~ from GrIORef X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~5518 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ac211af359667dd1afcc375e688c3aae46cb13e8;p=platform%2Fupstream%2FlibSkiaSharp.git call derived ~ from GrIORef TBR=mtklein@google.com NOTREECHECKS=true Review URL: https://codereview.chromium.org/641813002 --- diff --git a/include/gpu/GrGpuResource.h b/include/gpu/GrGpuResource.h index 666ab0d..00a5035 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();