void ObjectManager::destroy_object(const ObjectID& id) { // Remove all the listeners which are components of the object being deleted. m_listenerTable.remove_listeners_from(id); broadcast_message(Message_CPtr(new MsgObjectDestroyed(id))); // Remove all the listeners referring to the object. m_listenerTable.remove_listeners_to(id); m_objects.erase(id); m_idAllocator.deallocate(id.value()); }