From: joshualitt Date: Thu, 26 Mar 2015 17:41:02 +0000 (-0700) Subject: small fix for nanobench segfault when not running any tests X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~3011 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e0b19d4985846d64bb581013828a9dc5af401a5d;p=platform%2Fupstream%2FlibSkiaSharp.git small fix for nanobench segfault when not running any tests BUG=skia: Review URL: https://codereview.chromium.org/1030353004 --- diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp index 920979c..5e05932 100644 --- a/bench/nanobench.cpp +++ b/bench/nanobench.cpp @@ -894,6 +894,12 @@ int nanobench_main() { log->config("meta"); log->metric("max_rss_mb", sk_tools::getMaxResidentSetSizeMB()); +#if SK_SUPPORT_GPU + // Make sure we clean up the global GrContextFactory here, otherwise we might race with the + // SkEventTracer destructor + gGrFactory.reset(NULL); +#endif + return 0; }