MainComponent::~MainComponent() { removeChangeListener(this); }
void Layer::destroyCellCache() { if (m_walkable) { removeChangeListener(m_cellCache->getCellCacheChangeListener()); if (!m_interacts.empty()) { std::vector<Layer*>::iterator it = m_interacts.begin(); for (; it != m_interacts.end(); ++it) { (*it)->removeChangeListener(m_cellCache->getCellCacheChangeListener()); (*it)->setInteract(false, ""); } m_interacts.clear(); } delete m_cellCache; m_cellCache = NULL; m_walkable = false; } }