/** 销毁事件容器实例 */ void $(Destroy)( LCUI_EventBox box ) { RBTree_Destroy( &box->event_name ); RBTree_Destroy( &box->event_handler ); RBTree_Destroy( &box->event_slot ); LinkedList_Destroy( &box->events[0] ); LinkedList_Destroy( &box->events[1] ); }
LCUI_API void FontLIB_DestroyAll( void ) { if( !fontlib.is_inited ) { return; } fontlib.is_inited = FALSE; RBTree_Destroy( &fontlib.info_cache ); RBTree_Destroy( &fontlib.bitmap_cache ); #ifdef LCUI_FONT_ENGINE_FREETYPE FT_Done_FreeType( fontlib.library ); #endif }
/** 哈希红黑树的释放函数 @param HASHRBTREE *pHashRBTree - 哈希红黑树指针 @param DESTROYFUNC DestroyFunc - 数据释放函数 @return void - 无 */ void HashRBTree_Destroy(HASHRBTREE *pHashRBTree, DESTROYFUNC DestroyFunc) { /* 哈希红黑树中,我们只要按红黑树的释放方法将所有节点释放即可 */ if ( pHashRBTree != NULL && pHashRBTree->pTree != NULL ) { RBTree_Destroy( pHashRBTree->pTree, DestroyFunc ); /* 释放哈希表时,由于节点已经被释放了, 因此不需要释放节点 */ free(pHashRBTree->ppBucket); free(pHashRBTree); } }
void LCUI_FreeKeyboard(void) { RBTree_Destroy(&self.state_tree); LCUIMutex_Destroy(&self.mutex); }
static void FontLIB_DestroyTreeNode( void *arg ) { RBTree_Destroy( (LCUI_RBTree*)arg ); }
void LCUIWidget_FreeRenderer( void ) { self.active = FALSE; RectList_Clear( &self.rects ); RBTree_Destroy( &self.groups ); }