Skip to content

Instantly share code, notes, and snippets.

@kkabdol
Last active January 29, 2016 01:25
Show Gist options
  • Select an option

  • Save kkabdol/8e1239c8654aba7e3fd9 to your computer and use it in GitHub Desktop.

Select an option

Save kkabdol/8e1239c8654aba7e3fd9 to your computer and use it in GitHub Desktop.
Make sure EngineExit() is always called.
int32 GuardedMain( ... )
{
// make sure GEngineLoop::Exit() is always called.
struct EngineLoopCleanupGuard
{
~EngineLoopCleanupGuard()
{
EngineExit();
}
} CleanupGuard;
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment