Index: dm/DM.cpp |
diff --git a/dm/DM.cpp b/dm/DM.cpp |
index c8d1ec7f671827dc7ab7f7f6a42f03825e55ef65..faee2ccb1b64538e6f70df785efef8f924934811 100644 |
--- a/dm/DM.cpp |
+++ b/dm/DM.cpp |
@@ -8,6 +8,7 @@ |
#include "SkCommonFlags.h" |
#include "SkForceLinking.h" |
#include "SkGraphics.h" |
+#include "SkInstCnt.h" |
#include "SkMD5.h" |
#include "SkOSFile.h" |
#include "SkTDynamicHash.h" |
@@ -490,6 +491,9 @@ int dm_main() { |
SetupCrashHandler(); |
SkAutoGraphics ag; |
SkTaskGroup::Enabler enabled(FLAGS_threads); |
+ if (FLAGS_leaks) { |
+ SkInstCountPrintLeaksOnExit(); |
+ } |
gather_gold(); |