Use method same as MacOS solution fix js pre-compiled framework project crash when exit on windows.

This commit is contained in:
肖峰 2015-12-31 09:54:32 +08:00
parent 0c0f241c5e
commit 7bd9ceda10
2 changed files with 4 additions and 5 deletions

View File

@ -428,7 +428,9 @@ int SimulatorWin::run()
updateWindowTitle();
// startup message loop
return app->run();
int ret = app->run();
CC_SAFE_DELETE(_app);
return ret;
}
// services

View File

@ -9,8 +9,5 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
auto simulator = SimulatorWin::getInstance();
int ret = simulator->run();
delete simulator;
return ret;
return SimulatorWin::getInstance()->run();
}