From: Julian Smart Date: Thu, 2 Aug 2001 17:16:56 +0000 (+0000) Subject: Removed memory leak X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5648c0ad511627e710807752ec6d193f11b8c23e?ds=inline Removed memory leak git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp index b06ff27e38..22ee0816c9 100644 --- a/src/msw/spinctrl.cpp +++ b/src/msw/spinctrl.cpp @@ -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());