mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-14 04:45:57 +01:00
WINGs: Add functions to release application memory
This commit is contained in:
committed by
Carlos R. Mafra
parent
36c3f7edf4
commit
588e04dda7
@@ -94,6 +94,21 @@ void W_InitNotificationCenter(void)
|
||||
notificationCenter->observerTable = WMCreateHashTable(WMIntHashCallbacks);
|
||||
}
|
||||
|
||||
void W_ReleaseNotificationCenter(void)
|
||||
{
|
||||
if (notificationCenter) {
|
||||
if (notificationCenter->nameTable)
|
||||
WMFreeHashTable(notificationCenter->nameTable);
|
||||
if (notificationCenter->objectTable)
|
||||
WMFreeHashTable(notificationCenter->objectTable);
|
||||
if (notificationCenter->observerTable)
|
||||
WMFreeHashTable(notificationCenter->observerTable);
|
||||
|
||||
wfree(notificationCenter);
|
||||
notificationCenter = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
WMAddNotificationObserver(WMNotificationObserverAction * observerAction,
|
||||
void *observer, const char *name, void *object)
|
||||
|
||||
Reference in New Issue
Block a user