Merge pull request #666 from lioncash/delete
Project64: correct delete usages on arrays
This commit is contained in:
commit
160d27d400
|
@ -703,7 +703,7 @@ void CMainMenu::FillOutMenu ( HMENU hMenu )
|
||||||
WCHAR *w_LastRom = new WCHAR[MenuString.length() + 1];
|
WCHAR *w_LastRom = new WCHAR[MenuString.length() + 1];
|
||||||
::mbstowcs(w_LastRom, MenuString.c_str(), 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));
|
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];
|
WCHAR *w_LastDir = new WCHAR[MenuString.length() + 1];
|
||||||
::mbstowcs(w_LastDir, MenuString.c_str(), 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));
|
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
|
/* File Menu
|
||||||
|
|
|
@ -199,7 +199,7 @@ int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR /
|
||||||
char *lbuffer = new char[10];
|
char *lbuffer = new char[10];
|
||||||
if (GetLocaleInfoA(LOCALE_SYSTEM_DEFAULT, LOCALE_SABBREVLANGNAME, lbuffer, 10))
|
if (GetLocaleInfoA(LOCALE_SYSTEM_DEFAULT, LOCALE_SABBREVLANGNAME, lbuffer, 10))
|
||||||
setlocale(LC_ALL, lbuffer);
|
setlocale(LC_ALL, lbuffer);
|
||||||
delete lbuffer;
|
delete[] lbuffer;
|
||||||
|
|
||||||
CoInitialize(NULL);
|
CoInitialize(NULL);
|
||||||
try
|
try
|
||||||
|
|
Loading…
Reference in New Issue