void onexit( void ) { printf("Cleaning up\n"); delete video_body; // wait for thread to finish executing printf("Waiting for Spidermonkey to finish...\n"); pthread_mutex_lock(&g_pSpiderMonkeyMutex); printf("Cleaning up Spidermonkey.\n"); SpidermonkeyDestroy(); pthread_mutex_unlock(&g_pSpiderMonkeyMutex); destroyPrefs(); filterCleanUp(); #ifdef USE_SDL quitSdl(); #endif #ifdef HAVE_AUDIO AVDM_cleanup(); #endif destroyGUI(); printf("End of cleanup\n"); ADMImage_stat(); ADM_memStat(); ADM_memStatEnd(); printf("\nGoodbye...\n\n"); #if defined(ADM_DEBUG) && defined(FIND_LEAKS) check_leaks(); #endif }
bool leak_check_teardown(void) { check_leaks_pop(global_talloc_context); if (snapshot_stack != NULL) { _set_leak_err_msg("Exiting with a non-empty stack"); return false; } return check_leaks(global_talloc_context, 0); }
bool leak_check_teardown(void) { bool res; check_leaks_pop(global_talloc_context); if (snapshot_stack != NULL) { _set_leak_err_msg("Exiting with a non-empty stack"); return false; } res = check_leaks(global_talloc_context, 0); talloc_disable_null_tracking(); talloc_free(global_talloc_context); return res; }
/** * Destructor to decrement the count. When the count is zero, * #check_leaks will be called. */ __debug_new_counter::~__debug_new_counter() { if (--_S_count == 0 && new_autocheck_flag) if (check_leaks()) { new_verbose_flag = true; #if defined(__GNUC__) && __GNUC__ >= 3 if (!getenv("GLIBCPP_FORCE_NEW") && !getenv("GLIBCXX_FORCE_NEW")) fprintf(new_output_fp, "*** WARNING: GCC 3 or later is detected, please make sure the\n" " environment variable GLIBCPP_FORCE_NEW (GCC 3.2 and 3.3) or\n" " GLIBCXX_FORCE_NEW (GCC 3.4 and later) is defined. Check the\n" " README file for details.\n"); #endif } }
__debug_new_counter::~__debug_new_counter() { if ((--_S_count == 0) && new_autocheck_flag) { check_leaks(); } }