Esempio n. 1
0
ResourceManager::~ResourceManager()
{
	const ResourceMap::Entry* begin = sort_map::begin(_rm);
	const ResourceMap::Entry* end = sort_map::end(_rm);

	for (; begin != end; begin++)
	{
		const StringId64 type = begin->pair.first.type;
		const StringId64 name = begin->pair.first.name;
		on_offline(type, name);
		on_unload(type, begin->pair.second.data);
	}
}
Esempio n. 2
0
void ResourceManager::unload(StringId64 type, StringId64 name)
{
	flush();

	ResourcePair id = { type, name };
	ResourceEntry& entry = sort_map::get(_rm, id, ResourceEntry::NOT_FOUND);

	if (--entry.references == 0)
	{
		on_offline(type, name);
		on_unload(type, entry.data);

		sort_map::remove(_rm, id);
		sort_map::sort(_rm);
	}
}
Esempio n. 3
0
KPROXY_API void kproxy_uninit()
{
	uninit_blklib();
	uninit_network();
	
	if(proxy_adapter){
		on_offline(0, 0);
		delete_adapter(proxy_adapter);
		proxy_adapter = 0;
	}
	if(x_buffer){
		__free__(x_buffer);
		x_buffer = 0;
	}
	
	ex_uninit();
}