Ejemplo n.º 1
0
void Content::dispose()
{
	if (_disposed)
		return;

	Ref<Content> safe = this;

	_disposed			= true;

	try
	{
		unload();
	}
	catch (Exception& ex)
	{
		LOG(0, "*** '%s': disposed but unload failed: %s", getSourceUrl().c_str(), ex.getFullDescription().c_str());
	}

	ContentManager* manager = getManager();
	if (manager)
		manager->onDispose(this);

	onDispose();

	_source			= NULL;
	_proxy				= NULL;
	_linked			= false;
	_loading			= false;
	_loaded			= false;

	if (hasCacheEntry())
		getCacheEntry()->discard();
}
Ejemplo n.º 2
0
 virtual void dispose() {
     m_flags |= DISPOSED;
     onDispose();
 }