]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/spinctrl.cpp
treectrl -> treetest
[wxWidgets.git] / src / msw / spinctrl.cpp
index e4cef9f9ac4ed6ec6661fce486bcd1142686808a..22ee0816c994a84e47afdf81fb5cbb32a8c9472f 100644 (file)
@@ -40,7 +40,7 @@
 #include "wx/spinctrl.h"
 #include "wx/msw/private.h"
 
-#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) || defined(__TWIN32__))
+#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
     #include <commctrl.h>
 #endif
 
@@ -317,6 +317,10 @@ wxSpinCtrl::~wxSpinCtrl()
 {
     ms_allSpins.Remove(this);
 
+    // This removes spurious memory leak reporting
+    if (ms_allSpins.GetCount() == 0)
+        ms_allSpins.Clear();
+
     // destroy the buddy window because this pointer which wxBuddyTextWndProc
     // uses will not soon be valid any more
     ::DestroyWindow(GetBuddyHwnd());