mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 16:49:58 -06:00
DolphinWX: Eliminate some memory leaks
Since the menus aren't actually assigned a parent, they would not be freed by wx. Plus, these should have initially been constructed on the stack in the first place. Technically any time someone right-clicked the game list they would be leaking memory.
This commit is contained in:
@ -274,10 +274,10 @@ void CRegisterView::OnMouseDownR(wxGridEvent& event)
|
||||
wxString strNewVal = GetValueByRowCol(row, col);
|
||||
TryParse("0x" + WxStrToStr(strNewVal), &m_selectedAddress);
|
||||
|
||||
wxMenu* menu = new wxMenu;
|
||||
menu->Append(IDM_WATCHADDRESS, _("Add to &watch"));
|
||||
menu->Append(IDM_VIEWMEMORY, _("View &memory"));
|
||||
PopupMenu(menu);
|
||||
wxMenu menu;
|
||||
menu.Append(IDM_WATCHADDRESS, _("Add to &watch"));
|
||||
menu.Append(IDM_VIEWMEMORY, _("View &memory"));
|
||||
PopupMenu(&menu);
|
||||
}
|
||||
|
||||
void CRegisterView::OnPopupMenu(wxCommandEvent& event)
|
||||
|
Reference in New Issue
Block a user