Exemple #1
0
 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();
         }
     }
 }
Exemple #2
0
 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();
     }
 }