//----------------------------------------------------------------------- void ResourceManager::remove(ResourceHandle handle) { ResourcePtr res = getByHandle(handle); if (!res.isNull()) { removeImpl(res); } }
//----------------------------------------------------------------------- void ResourceManager::unload(ResourceHandle handle) { ResourcePtr res = getByHandle(handle); if (!res.isNull()) { // Unload resource res->unload(); } }
//----------------------------------------------------------------------- void ResourceManager::remove(ResourceHandle handle) { ResourcePtr res = getByHandle(handle); #if OGRE_RESOURCEMANAGER_STRICT OgreAssert(res, "attempting to remove unknown resource"); #endif if (res) { removeImpl(res); } }
//----------------------------------------------------------------------- void ResourceManager::unload(ResourceHandle handle) { ResourcePtr res = getByHandle(handle); #if OGRE_RESOURCEMANAGER_STRICT OgreAssert(res, "attempting to unload unknown resource"); #endif if (res) { res->unload(); } }
//----------------------------------------------------------------------- void CachedResourceOgreManager::frameRenderingQueued(const FrameEvent& _evt) { NumFramesNotUsedMap::iterator it = mNumFramesNotUsedMap.begin(); while(it != mNumFramesNotUsedMap.end()) { ResourceHandle handle = it->first; size_t& numFramesNotUsed = (it++)->second; if(numFramesNotUsed++ > mNumFramesBeforeUnload) { ResourcePtr resource = getByHandle(handle); resource->unload(); } } }