virtual void onDraw(const int loops, SkCanvas*) { for (int i = 0; i < loops; ++i) { SkWeakRefCnt ref; for (int j = 0; j < M; ++j) { ref.ref(); ref.unref(); } } }
void onDraw(const int loops, SkCanvas*) override { for (int i = 0; i < loops; ++i) { SkWeakRefCnt* ref = new SkWeakRefCnt(); for (int j = 0; j < M; ++j) { ref->ref(); ref->unref(); } ref->unref(); } }