Index: bench/nanobench.cpp |
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp |
index 920979cbf9e66c865f2aa21922344ebaccc4e262..5e059328adae5e9fae805da2074a035debac9a2a 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; |
} |