diff options
-rw-r--r-- | bench/TextBench.cpp | 1 | ||||
-rw-r--r-- | bench/benchmain.cpp | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/bench/TextBench.cpp b/bench/TextBench.cpp index 0bef92c7d7..9334c33476 100644 --- a/bench/TextBench.cpp +++ b/bench/TextBench.cpp @@ -49,6 +49,7 @@ class TextBench : public SkBenchmark { public: TextBench(void* param, const char text[], int ps, SkColor color, FontQuality fq, bool doPos = false) : INHERITED(param) { + fPos = NULL; fFQ = fq; fDoPos = doPos; fText.set(text); diff --git a/bench/benchmain.cpp b/bench/benchmain.cpp index 0ea48e9ed4..73aa9885f7 100644 --- a/bench/benchmain.cpp +++ b/bench/benchmain.cpp @@ -374,6 +374,7 @@ static void determine_gpu_context_size(SkTDict<const char*>& defineDict, if (*contextHeight < dim.fY) { *contextHeight = dim.fY; } + bench->unref(); } } @@ -737,6 +738,8 @@ int main (int argc, char * const argv[]) { Iter iter(&defineDict); SkBenchmark* bench; while ((bench = iter.next()) != NULL) { + SkAutoTUnref<SkBenchmark> benchUnref(bench); + SkIPoint dim = bench->getSize(); if (dim.fX <= 0 || dim.fY <= 0) { continue; |