diff --git a/src/Runtime/Scene.cc b/src/Runtime/Scene.cc index a913616..b03f13d 100644 --- a/src/Runtime/Scene.cc +++ b/src/Runtime/Scene.cc @@ -11,6 +11,11 @@ namespace volt::runtime { : m_name{name}, m_running{false} {} + Scene::~Scene(void) { + m_registry.clear(); + VOLT_LOG_INFO("Scene: destroyed successfully"); + } + Entity Scene::CreateEntity(const std::string &name) { return CreateEntity(core::SnowflakeID(), name); } diff --git a/src/Runtime/Scene.hh b/src/Runtime/Scene.hh index e5c04a6..2a30fc5 100644 --- a/src/Runtime/Scene.hh +++ b/src/Runtime/Scene.hh @@ -41,6 +41,7 @@ namespace volt::runtime { Scene(Scene &&) = delete; Scene &operator=(const Scene &) = delete; Scene &operator=(Scene &&) = delete; + ~Scene(void); Entity CreateEntity(const std::string &name = std::string()); Entity CreateEntity(core::SnowflakeID id, const std::string &name = std::string()); void DestroyEntity(Entity e);