예제 #1
0
int WINAPI DllMain ( HINSTANCE hModule, DWORD dwReason, PVOID pvNothing )
{
    switch ( dwReason )
    {
        case DLL_PROCESS_ATTACH:
        {
            return TRUE;  
        }

        case DLL_PROCESS_DETACH:
        {
            // Make sure the client is destroyed upon destruction
            if ( g_pClient )
            {
                delete g_pClient;
                g_pClient = NULL;
            }

            // Dump any memory leaks we might've had and return
            DumpUnfreed ();
            return TRUE;
        }
    }

    return FALSE;
}
예제 #2
0
void CGameSA::Terminate ( void )
{
    // Initiate the destruction
    delete this;

    // Dump any memory leaks if DETECT_LEAK is defined
    #ifdef DETECT_LEAKS    
        DumpUnfreed();
    #endif
}
예제 #3
0
int
main(int, char **)
{
	Tranquility *browser = new Tranquility();
	browser->Run();
	delete browser;

#ifdef DEBUG
	DumpUnfreed();
#endif

	return 0;
}