Skip to content

Commit

Permalink
Add printLeaks call to alternative Win32 main method (#2278)
Browse files Browse the repository at this point in the history
Add printLeaks call to alternative main method
  • Loading branch information
rh101 authored Dec 15, 2024
1 parent 5507b5d commit 444d143
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion templates/common/proj.win32/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdL
}
#else
int main(int, char**) {
return axmol_main();
auto result = axmol_main();

#if AX_OBJECT_LEAK_DETECTION
Object::printLeaks();
#endif

return result;
}
#endif

0 comments on commit 444d143

Please sign in to comment.