diff options
| author | skidau <skidau@gmail.com> | 2014-11-13 13:39:44 +1100 |
|---|---|---|
| committer | skidau <skidau@gmail.com> | 2014-11-13 13:39:44 +1100 |
| commit | 4ca39d173b05213e34adb2667d781da0502c96b5 (patch) | |
| tree | a0aa413ac53ac076ca18d47458083ea48f5ca9af /Source/Core/DolphinWX/Debugger/WatchView.cpp | |
| parent | b1f8974db8b94861f02abec7ab442f6855181199 (diff) | |
| parent | 892bbdade669def297b0469509dd648fef6478bd (diff) | |
Merge pull request #1530 from lioncash/ui-leaks
DolphinWX: Eliminate some memory leaks
Diffstat (limited to 'Source/Core/DolphinWX/Debugger/WatchView.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/Debugger/WatchView.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Core/DolphinWX/Debugger/WatchView.cpp b/Source/Core/DolphinWX/Debugger/WatchView.cpp index 8bf1d0b14b..d5d6913a66 100644 --- a/Source/Core/DolphinWX/Debugger/WatchView.cpp +++ b/Source/Core/DolphinWX/Debugger/WatchView.cpp @@ -247,18 +247,18 @@ void CWatchView::OnMouseDownR(wxGridEvent& event) TryParse("0x" + WxStrToStr(strNewVal), &m_selectedAddress); } - wxMenu* menu = new wxMenu; + wxMenu menu; if (row != 0 && row != (int)(PowerPC::watches.GetWatches().size() + 1)) - menu->Append(IDM_DELETEWATCH, _("&Delete watch")); + menu.Append(IDM_DELETEWATCH, _("&Delete watch")); if (row != 0 && row != (int)(PowerPC::watches.GetWatches().size() + 1) && (col == 1 || col == 2)) { #ifdef ENABLE_MEM_CHECK - menu->Append(IDM_ADDMEMCHECK, _("Add memory &breakpoint")); + menu.Append(IDM_ADDMEMCHECK, _("Add memory &breakpoint")); #endif - menu->Append(IDM_VIEWMEMORY, _("View &memory")); + menu.Append(IDM_VIEWMEMORY, _("View &memory")); } - PopupMenu(menu); + PopupMenu(&menu); } void CWatchView::OnPopupMenu(wxCommandEvent& event) |
