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