add virtual ~Effect()

Today we make an sk_sp<Effect> from an sk_sp<EffectImpl>.
But when the sk_sp<Effect> 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
This commit is contained in:
mtklein 2016-03-07 12:28:17 -08:00 committed by Commit bot
parent aecc018f86
commit 71aca54991

View File

@ -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<EffectImpl> Create() {
return sk_sp<EffectImpl>(new EffectImpl);
}