diff --git a/source/Event/Basic.cpp b/source/Event/Basic.cpp index 2e784f52..e64f31d5 100644 --- a/source/Event/Basic.cpp +++ b/source/Event/Basic.cpp @@ -34,16 +34,16 @@ BasicEvent::BasicEvent(SQInt32 type, bool suspended) noexcept , m_Suspended(suspended) { Attach(); - // Receive notification when the VM is about to be closed to release object references - _Core->VMClose.Connect< BasicEvent, &BasicEvent::VMClose >(this); } // ------------------------------------------------------------------------------------------------ BasicEvent::~BasicEvent() { Detach(); - // Stop receiving notification when the VM is about to be closed - _Core->VMClose.Disconnect< BasicEvent, &BasicEvent::VMClose >(this); + // Release the reference to the specified callback + m_OnTrigger.Release2(); + // Release the reference to the specified user data + m_Data.Release(); } // ------------------------------------------------------------------------------------------------ @@ -1905,15 +1905,6 @@ void BasicEvent::Detach() noexcept } } -// ------------------------------------------------------------------------------------------------ -void BasicEvent::VMClose() noexcept -{ - // Release the reference to the specified callback - m_OnTrigger.Release2(); - // Release the reference to the specified user data - m_Data.Release(); -} - // ================================================================================================ bool Register_BasicEvent(HSQUIRRELVM vm) { diff --git a/source/Event/Basic.hpp b/source/Event/Basic.hpp index 5e5e4ab9..052bf7ca 100644 --- a/source/Event/Basic.hpp +++ b/source/Event/Basic.hpp @@ -757,11 +757,6 @@ public: */ void LogMessage(SQInt32 type, const SQChar * message) noexcept; - /* -------------------------------------------------------------------------------------------- - * ... - */ - void VMClose() noexcept; - protected: /* --------------------------------------------------------------------------------------------