MemoryView: Fix a dealloc of a stack reference

stack allocation only works with the root menu. Any other children must be
heap allocated.

These however, will be freed by wxWidgets.
This commit is contained in:
Lioncash 2014-11-13 20:10:36 -05:00
parent 5fb94230cd
commit ffc00b42e9
1 changed files with 5 additions and 5 deletions

View File

@ -230,11 +230,11 @@ void CMemoryView::OnMouseDownR(wxMouseEvent& event)
menu.Append(IDM_WATCHADDRESS, _("Add to &watch"));
menu.Append(IDM_TOGGLEMEMORY, _("Toggle &memory"));
wxMenu viewAsSubMenu;
viewAsSubMenu.Append(IDM_VIEWASFP, _("FP value"));
viewAsSubMenu.Append(IDM_VIEWASASCII, "ASCII");
viewAsSubMenu.Append(IDM_VIEWASHEX, _("Hex"));
menu.AppendSubMenu(&viewAsSubMenu, _("View As:"));
wxMenu* viewAsSubMenu = new wxMenu;
viewAsSubMenu->Append(IDM_VIEWASFP, _("FP value"));
viewAsSubMenu->Append(IDM_VIEWASASCII, "ASCII");
viewAsSubMenu->Append(IDM_VIEWASHEX, _("Hex"));
menu.AppendSubMenu(viewAsSubMenu, _("View As:"));
PopupMenu(&menu);
}