X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae090fdb7f4be47466b5728ad37065923b48c8c3..4fa0a5b44341885a0886f2ae6723d2441bd1f62f:/src/msw/spinctrl.cpp?ds=sidebyside 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());