diff --git a/modules/irc/Module.cpp b/modules/irc/Module.cpp index 145e9d8a..5e2a1f48 100644 --- a/modules/irc/Module.cpp +++ b/modules/irc/Module.cpp @@ -96,6 +96,7 @@ static void OnSquirrelTerminate() NullObject().Release(); NullTable().Release(); NullArray().Release(); + NullLightObj().Release(); NullFunction().ReleaseGently(); } diff --git a/modules/json/Module.cpp b/modules/json/Module.cpp index b75b876e..0c0248c9 100644 --- a/modules/json/Module.cpp +++ b/modules/json/Module.cpp @@ -99,6 +99,7 @@ static void OnSquirrelTerminate() NullObject().Release(); NullTable().Release(); NullArray().Release(); + NullLightObj().Release(); NullFunction().ReleaseGently(); } diff --git a/modules/mmdb/Module.cpp b/modules/mmdb/Module.cpp index 64c00678..6561e58c 100644 --- a/modules/mmdb/Module.cpp +++ b/modules/mmdb/Module.cpp @@ -119,10 +119,11 @@ static bool OnSquirrelLoad() return false; } // Prevent common null objects from using dead virtual machines - NullArray() = Array(); - NullTable() = Table(); - NullObject() = Object(); - NullFunction() = Function(); + NullObject().Release(); + NullTable().Release(); + NullArray().Release(); + NullLightObj().Release(); + NullFunction().ReleaseGently(); // Register the module API if (RegisterAPI(DefaultVM::Get())) { diff --git a/modules/mysql/Module.cpp b/modules/mysql/Module.cpp index 09c22b7e..7fcbca56 100644 --- a/modules/mysql/Module.cpp +++ b/modules/mysql/Module.cpp @@ -91,6 +91,7 @@ static void OnSquirrelTerminate() NullObject().Release(); NullTable().Release(); NullArray().Release(); + NullLightObj().Release(); NullFunction().ReleaseGently(); // Release script resources... } diff --git a/modules/sample/Module.cpp b/modules/sample/Module.cpp index 1282a288..ea2aac97 100644 --- a/modules/sample/Module.cpp +++ b/modules/sample/Module.cpp @@ -58,10 +58,11 @@ static bool OnSquirrelLoad() return false; } // Prevent common null objects from using dead virtual machines - NullArray() = Array(); - NullTable() = Table(); - NullObject() = Object(); - NullFunction() = Function(); + NullObject().Release(); + NullTable().Release(); + NullArray().Release(); + NullLightObj().Release(); + NullFunction().ReleaseGently(); // Register the module API if (RegisterAPI(DefaultVM::Get())) { diff --git a/modules/sqlite/Module.cpp b/modules/sqlite/Module.cpp index 5b603264..e595540c 100644 --- a/modules/sqlite/Module.cpp +++ b/modules/sqlite/Module.cpp @@ -95,6 +95,7 @@ static void OnSquirrelTerminate() NullObject().Release(); NullTable().Release(); NullArray().Release(); + NullLightObj().Release(); NullFunction().ReleaseGently(); // Release script resources... } diff --git a/modules/xml/Module.cpp b/modules/xml/Module.cpp index c85ba3c6..f483b5f9 100644 --- a/modules/xml/Module.cpp +++ b/modules/xml/Module.cpp @@ -373,6 +373,7 @@ static void OnSquirrelTerminate() NullObject().Release(); NullTable().Release(); NullArray().Release(); + NullLightObj().Release(); NullFunction().ReleaseGently(); // Release script resources... }