From: George Tasker Date: Tue, 29 Jan 2002 21:27:08 +0000 (+0000) Subject: Fixes memory leaks that occur when dragging toolbars around... Dragging a toolbar... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4926b15b7dd671cb0c0fde8902285371f1e95bf0?ds=inline Fixes memory leaks that occur when dragging toolbars around... Dragging a toolbar so that it changes the dock state to reproduce the memory leak in old code - Submitted by Hans Van Leemputten git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/contrib/src/fl/garbagec.cpp b/contrib/src/fl/garbagec.cpp index 564823928b..993da58553 100644 --- a/contrib/src/fl/garbagec.cpp +++ b/contrib/src/fl/garbagec.cpp @@ -196,6 +196,7 @@ void GarbageCollector::ArrangeCollection() pNode = pNode->Next(); } + mAllNodes.Clear(); break; } @@ -217,8 +218,7 @@ wxList& GarbageCollector::GetCycledObjects() void GarbageCollector::Reset() { DestroyItemList( mAllNodes ); - - mRegularLst.Clear(); - mCycledLst.Clear(); + DestroyItemList( mRegularLst ); + DestroyItemList( mCycledLst ); }