diff options
| author | Lioncash <mathew1800@gmail.com> | 2014-11-11 09:50:11 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2014-11-11 09:50:16 -0500 |
| commit | 892bbdade669def297b0469509dd648fef6478bd (patch) | |
| tree | 7398436a807d1f1f19c45e30c3722ef58abedd0e /Source/Core/DolphinWX/Debugger/RegisterView.cpp | |
| parent | 71d8165a8649cde73663b1534bbdd6094faecf2d (diff) | |
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.
Diffstat (limited to 'Source/Core/DolphinWX/Debugger/RegisterView.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/Debugger/RegisterView.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/DolphinWX/Debugger/RegisterView.cpp b/Source/Core/DolphinWX/Debugger/RegisterView.cpp index ca7cdc70ec..f7a268cad0 100644 --- a/Source/Core/DolphinWX/Debugger/RegisterView.cpp +++ b/Source/Core/DolphinWX/Debugger/RegisterView.cpp @@ -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) |
