diff --git a/tools/simulator/frameworks/runtime-src/proj.win32/main.cpp b/tools/simulator/frameworks/runtime-src/proj.win32/main.cpp index c4c0104259..09468bbf24 100755 --- a/tools/simulator/frameworks/runtime-src/proj.win32/main.cpp +++ b/tools/simulator/frameworks/runtime-src/proj.win32/main.cpp @@ -10,5 +10,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine); auto simulator = SimulatorWin::getInstance(); - return simulator->run(); + int ret = simulator->run(); + delete simulator; + return ret; }