ResourceManager::~ResourceManager()
{
thread.terminate();
+
+ for(ResourceMap::iterator i=resources.begin(); i!=resources.end(); ++i)
+ i->second.resource->set_manager(0);
}
void ResourceManager::add_resource(Resource &r)
void terminate();
};
+ typedef std::map<const Resource *, ManagedResource> ResourceMap;
typedef std::list<ManagedResource *> LoadQueue;
LoadingPolicy policy;
bool async_loads;
- std::map<const Resource *, ManagedResource> resources;
- std::list<ManagedResource *> queue;
+ ResourceMap resources;
+ LoadQueue queue;
LoadingThread thread;
public: