aMule Forum

English => en_Bugs => Topic started by: dolphinX on October 20, 2009, 03:54:33 AM

Title: memleak in OnRightClick
Post by: dolphinX on October 20, 2009, 03:54:33 AM
Hi

in void CFriendListCtrl::OnRightClick(wxMouseEvent& event) @ FriendListCtrl.cpp
forgot to "delete menu;"

and void CServerListCtrl::OnItemRightClicked(wxListEvent& event) @ ServerListCtrl.cpp
forgot to "delete serverMenu;"
Title: Re: memleak in OnRightClick
Post by: Kry on October 20, 2009, 07:16:02 AM
No, I don't think so. Can't delete a popup menu unless it's dismissed, and the popup menu is deleted automatically.


Haven't checked the source tho.
Title: Re: memleak in OnRightClick
Post by: Stu Redman on October 20, 2009, 09:29:27 PM
You're right, dolphinX. wx docu (http://docs.wxwidgets.org/stable/wx_wxwindow.html#wxwindowpopupmenu) states that the menu isn't deleted by the function, and it's deleted everywhere else in our code. Fixed in 9841, thank you!
Title: Re: memleak in OnRightClick
Post by: Kry on October 20, 2009, 10:09:59 PM
And I was wrong, product of not looking before talking!