SAT benchmark (#177)

This commit is contained in:
Erin Catto 2026-10-02 20:47:05 -07:00 • committed by GitHub
commit 51f056e0a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 5071 additions and 368 deletions

View file

@ -554,22 +554,18 @@ static sapp_desc BuildAppDesc( int argc, char** argv )
return desc;
}
// We own main (SOKOL_NO_ENTRY) so the leak dump can run after sapp_run returns,
// once sokol has torn down its window and context. On Windows sapp_run returns
// after that teardown; on macOS it may not return, so the dump is Windows only.
// The leak dump runs at CRT exit, after static destructors. Libraries such as ImGuizmo keep
// heap backed containers at file scope, and a dump right after sapp_run reports them.
int main( int argc, char** argv )
{
#if defined( _MSC_VER )
_CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE );
_CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDOUT );
_CrtSetDbgFlag( _CrtSetDbgFlag( _CRTDBG_REPORT_FLAG ) | _CRTDBG_LEAK_CHECK_DF );
#endif
sapp_desc desc = BuildAppDesc( argc, argv );
sapp_run( &desc );
#if defined( _MSC_VER )
_CrtDumpMemoryLeaks();
#endif
return s_exitCode;
}