+#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
+
+ if (wxDebugContext::CountObjectsLeft() > 0)
+ {
+ wxTrace("There were memory leaks.\n");
+ wxDebugContext::Dump();
+ wxDebugContext::PrintStatistics();
+ }
+ wxDebugContext::SetStream(NULL, NULL);