void ez328_close(void) { #if !defined(CONFIG_XCOPILOT) && \ !defined(CONFIG_SOFT_CHIPSLICE) /* Restore register settings, free video memory */ memcpy(REGS_START,ez328_saveregs,REGS_LEN); #endif #if defined(CONFIG_XCOPILOT) unload_inlib(inlib_main); /* Chipslice loaded an input driver */ #endif g_free(FB_MEM); }
void gl_close(void) { if (gl_global.h_infilter) handle_free(-1,gl_global.h_infilter); if (gl_global.display_rend) { g_free(gl_global.display_rend); gl_global.display_rend = NULL; } unload_inlib(gl_global.continuous_inlib); if (gl_global.osd_font) font_descriptor_destroy(gl_global.osd_font); }
/* Free any object in a handlenode */ void object_free(struct handlenode *n) { #ifdef DEBUG_KEYS num_handles--; #endif #ifdef DEBUG_MEMORY printf("Enter object free of handle 0x%08X, type %d\n",n->id,n->type & PG_TYPEMASK); #endif if (!(n->type & HFLAG_NFREE)) { switch (n->type & PG_TYPEMASK) { case PG_TYPE_BITMAP: VID(bitmap_free) ((hwrbitmap)n->obj); break; case PG_TYPE_WIDGET: widget_remove((struct widget *)n->obj); break; case PG_TYPE_THEME: theme_remove((struct pgmemtheme *)n->obj); break; case PG_TYPE_DRIVER: unload_inlib((struct inlib *)n->obj); break; case PG_TYPE_WT: wt_free((struct pgmemwt *)n->obj); break; case PG_TYPE_INFILTER: infilter_delete((struct infilter *)n->obj); break; case PG_TYPE_CURSOR: cursor_delete((struct cursor *)n->obj); break; case PG_TYPE_PGSTRING: pgstring_delete((struct pgstring *)n->obj); break; case PG_TYPE_FONTDESC: font_descriptor_destroy((struct font_descriptor *)n->obj); break; /* Object types that are memory-managed independently of their handles */ case PG_TYPE_DIVTREE: case PG_TYPE_PARAGRAPH: break; default: g_free(n->obj); } } #ifdef DEBUG_MEMORY printf("Leave object free of handle 0x%08X, type %d\n",n->id,n->type & PG_TYPEMASK); #endif }
void sdlgl_close(void) { gl_close(); unload_inlib(inlib_main); /* Take out our input driver */ inlib_main = NULL; SDL_Quit(); }