void WindowManager::_ProcessRemovedItems() { if (removedWindows.size()) { WindowList::iterator rwit = removedWindows.begin(); WindowList::iterator rwend = removedWindows.end(); while (rwit != rwend) { RenderWindow* wp = (*rwit); _Unregister(wp); ++rwit; } removedWindows.clear(); } }
/* public - replacement for FreeLibrary() */ BOOL MyFreeLibrary(HMODULE hModule) { MEMORYMODULE *p = loaded; while (p) { if ((HMODULE)p == hModule) { if (--p->refcount == 0) { _Unregister(p); MemoryFreeLibrary(p); } return TRUE; } p = p->next; } return FreeLibrary(hModule); }
void WindowManager::UnregisterWindow(RenderWindow* winPtr) { if (processing) removedWindows.push_back(winPtr); else _Unregister(winPtr); }