ResourceManager::ResourceManager():
policy(LOAD_ON_DEMAND),
async_loads(true),
+ total_data_size(0),
size_limit(0),
frame(0),
min_retain_frames(30),
else if(state>ManagedResource::LOAD_QUEUED && state<ManagedResource::LOADED)
thread.remove_resource(managed);
+ for(vector<ResourceWatcher *>::const_iterator i=managed.watchers.begin(); i!=managed.watchers.end(); ++i)
+ (*i)->resource_removed(r);
+
MutexLock lock(map_mutex);
remove_existing(resources, &r);
}
sem(1),
capacity(2),
size(0),
+ loaded_data_size(0),
done(false)
{
launch();
}
}
-ResourceManager::ManagedResource *ResourceManager::LoadingThread::front(LoadQueue &queue)
+ResourceManager::ManagedResource *ResourceManager::LoadingThread::front(LoadQueue &que)
{
MutexLock lock(queue_mutex);
- if(queue.empty())
+ if(que.empty())
return 0;
- return queue.front();
+ return que.front();
}
void ResourceManager::LoadingThread::add_resource(ManagedResource &r)