void ShaderUnloadTask::doRun() { CDNArchive::clearArchive(mArchiveName); SharedResourcePtr resource = mResource.lock(); if (resource) { resource->unloaded(true, mEpoch); } }
/* bool MeshUnloadTask::mainThreadUnload(String name) { Ogre::MeshManager::getSingleton().unload(name); // operationCompleted(Ogre::BackgroundProcessTicket(), Ogre::BackgroundProcessResult()); return false; } */ void MeshUnloadTask::doRun() { /*I REALLY wish this were true*/ // SequentialWorkQueue::getSingleton().queueWork(std::tr1::bind(&MeshUnloadTask::mainThreadUnload, this, mHash)); String hash = mHash; //CDNArchive::canonicalMhashName(mHash); Ogre::MeshManager* meshManager = Ogre::MeshManager::getSingletonPtr(); meshManager->remove(hash); Ogre::ResourcePtr meshResource = meshManager->getByName(hash); assert(meshResource.isNull()); SharedResourcePtr resource = mResource.lock(); if (resource) resource->unloaded(true, mEpoch); }