void debug_finished(void) { debug_dump_mallocs(); g_free(gdb_program); g_hash_table_destroy(debug_hash); debug_destroy(); }
void debug_set_logfile(const char *path) { FILE *fp; fp = fopen(path, "a"); if (fp) { debug_destroy(); debug_fp = fp; fprintf(debug_fp, "Navit log started\n"); fflush(debug_fp); } }
/* Called by Geany before unloading the plugin. * Here any UI changes should be removed, memory freed and any other finalization done. * Be sure to leave Geany as it was before plugin_init(). */ void plugin_cleanup(void) { /* stop debugger if running */ if (DBS_IDLE != debug_get_state()) { debug_stop(); while (DBS_IDLE != debug_get_state()) g_main_context_iteration(NULL,FALSE); } config_destroy(); pixbufs_destroy(); debug_destroy(); breaks_destroy(); dpaned_destroy(); envtree_destroy(); /* release other allocated strings and objects */ gtk_widget_destroy(hbox); }
/** * Get rid of all debugging memory. * * THREADS: REENTRANT * * @param B BAKA thread/global state * @param bd Baka debug handle */ void bk_debug_destroy(bk_s B, struct bk_debug *bd) { if (!bd) { bk_error_printf(B, BK_ERR_NOTICE, "%s: Invalid argument\n", BK_FUNCNAME); return; } if (bd->bd_leveldb) { struct bk_debugnode *cur; DICT_NUKE_CONTENTS(bd->bd_leveldb, debug, cur, bk_error_printf(B, BK_ERR_ERR,"Could not delete item from front of CLC: %s\n",debug_error_reason(bd->bd_leveldb,NULL)), if (cur->bd_name) free(cur->bd_name); free(cur)); debug_destroy(bd->bd_leveldb); } #ifdef BK_USING_PTHREADS pthread_rwlock_destroy(&bd->bd_rwlock); #endif /* BK_USING_PTHREADS */ free(bd); }