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(); }
virtual void dispose() { m_flags |= DISPOSED; onDispose(); }