]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dcclient.cpp
fix for (too big) combobox height
[wxWidgets.git] / src / msw / dcclient.cpp
index ec20193357d8f65392fa8867b9dc390bfa574f5f..ca1caadb274323696f5e0b35c198f225656feb17 100644 (file)
@@ -62,11 +62,9 @@ WX_DEFINE_OBJARRAY(wxArrayDCInfo);
 // macros
 // ----------------------------------------------------------------------------
 
-#if !USE_SHARED_LIBRARY
     IMPLEMENT_DYNAMIC_CLASS(wxWindowDC, wxDC)
     IMPLEMENT_DYNAMIC_CLASS(wxClientDC, wxWindowDC)
     IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxWindowDC)
-#endif
 
 // ----------------------------------------------------------------------------
 // global variables
@@ -234,6 +232,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