From 71aca549914c868d50cd51ddff3fb7a5bfe250cd Mon Sep 17 00:00:00 2001 From: mtklein Date: Mon, 7 Mar 2016 12:28:17 -0800 Subject: add virtual ~Effect() Today we make an sk_sp from an sk_sp. But when the sk_sp dies, it calls ~Effect(), not ~EffectImpl(). Making ~Effect() virtual fixes this. This should make our Google3 tests sized-delete clean, unblocking those folks. Review URL: https://codereview.chromium.org/1769093002 --- tests/RefCntTest.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/RefCntTest.cpp') diff --git a/tests/RefCntTest.cpp b/tests/RefCntTest.cpp index f5345b6a54..d3cda7f38d 100644 --- a/tests/RefCntTest.cpp +++ b/tests/RefCntTest.cpp @@ -99,6 +99,7 @@ public: Effect() : fRefCnt(1) { gNewCounter += 1; } + virtual ~Effect() {} int fRefCnt; @@ -135,6 +136,8 @@ public: }; struct EffectImpl : public Effect { + ~EffectImpl() override {} + static sk_sp Create() { return sk_sp(new EffectImpl); } -- cgit v1.2.3