]> git.saurik.com Git - wxWidgets.git/commitdiff
Removed memory leak
authorJulian Smart <julian@anthemion.co.uk>
Thu, 2 Aug 2001 17:16:56 +0000 (17:16 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 2 Aug 2001 17:16:56 +0000 (17:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/spinctrl.cpp

index b06ff27e385b5be01003d16f5d76df2f4fca6a68..22ee0816c994a84e47afdf81fb5cbb32a8c9472f 100644 (file)
@@ -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());