Project64: correct delete usages on arrays

This commit is contained in:
Lioncash 2015-10-10 14:47:08 -04:00
parent eb3a5c5882
commit 5350cfac8d
2 changed files with 3 additions and 3 deletions

View File

@ -703,7 +703,7 @@ void CMainMenu::FillOutMenu ( HMENU hMenu )
WCHAR *w_LastRom = new WCHAR[MenuString.length() + 1];
::mbstowcs(w_LastRom, MenuString.c_str(), MenuString.length() + 1);
RecentRomMenu.push_back(MENU_ITEM(ID_RECENT_ROM_START + count, EMPTY_STRING, EMPTY_STDSTR, NULL, w_LastRom));
delete w_LastRom;
delete[] w_LastRom;
}
@ -725,7 +725,7 @@ void CMainMenu::FillOutMenu ( HMENU hMenu )
WCHAR *w_LastDir = new WCHAR[MenuString.length() + 1];
::mbstowcs(w_LastDir, MenuString.c_str(), MenuString.length() + 1);
RecentDirMenu.push_back(MENU_ITEM(ID_RECENT_DIR_START + count, EMPTY_STRING, EMPTY_STDSTR, NULL, w_LastDir));
delete w_LastDir;
delete[] w_LastDir;
}
/* File Menu

View File

@ -201,7 +201,7 @@ int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR /
char *lbuffer = new char[10];
if (GetLocaleInfoA(LOCALE_SYSTEM_DEFAULT, LOCALE_SABBREVLANGNAME, lbuffer, 10))
setlocale(LC_ALL, lbuffer);
delete lbuffer;
delete[] lbuffer;
CoInitialize(NULL);
try