]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dcclient.cpp
bitmap and image updates
[wxWidgets.git] / src / msw / dcclient.cpp
index ec20193357d8f65392fa8867b9dc390bfa574f5f..c675ce039f3b5323abf3a870cb6d749b8b9d4623 100644 (file)
@@ -234,6 +234,11 @@ wxPaintDC::~wxPaintDC()
             ::EndPaint(GetWinHwnd(m_canvas), &g_paintStruct);
 
             ms_cache.Remove(index);
+
+            // Reduce the number of bogus reports of non-freed memory
+            // at app exit
+            if (ms_cache.IsEmpty())
+                ms_cache.Clear();
         }
         //else: cached DC entry is still in use