1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00

Release the null lightweight object references as well.

This commit is contained in:
Sandu Liviu Catalin 2017-06-16 02:22:48 +03:00
parent b642e233a7
commit e8027dcb3d
7 changed files with 15 additions and 8 deletions

View File

@ -96,6 +96,7 @@ static void OnSquirrelTerminate()
NullObject().Release(); NullObject().Release();
NullTable().Release(); NullTable().Release();
NullArray().Release(); NullArray().Release();
NullLightObj().Release();
NullFunction().ReleaseGently(); NullFunction().ReleaseGently();
} }

View File

@ -99,6 +99,7 @@ static void OnSquirrelTerminate()
NullObject().Release(); NullObject().Release();
NullTable().Release(); NullTable().Release();
NullArray().Release(); NullArray().Release();
NullLightObj().Release();
NullFunction().ReleaseGently(); NullFunction().ReleaseGently();
} }

View File

@ -119,10 +119,11 @@ static bool OnSquirrelLoad()
return false; return false;
} }
// Prevent common null objects from using dead virtual machines // Prevent common null objects from using dead virtual machines
NullArray() = Array(); NullObject().Release();
NullTable() = Table(); NullTable().Release();
NullObject() = Object(); NullArray().Release();
NullFunction() = Function(); NullLightObj().Release();
NullFunction().ReleaseGently();
// Register the module API // Register the module API
if (RegisterAPI(DefaultVM::Get())) if (RegisterAPI(DefaultVM::Get()))
{ {

View File

@ -91,6 +91,7 @@ static void OnSquirrelTerminate()
NullObject().Release(); NullObject().Release();
NullTable().Release(); NullTable().Release();
NullArray().Release(); NullArray().Release();
NullLightObj().Release();
NullFunction().ReleaseGently(); NullFunction().ReleaseGently();
// Release script resources... // Release script resources...
} }

View File

@ -58,10 +58,11 @@ static bool OnSquirrelLoad()
return false; return false;
} }
// Prevent common null objects from using dead virtual machines // Prevent common null objects from using dead virtual machines
NullArray() = Array(); NullObject().Release();
NullTable() = Table(); NullTable().Release();
NullObject() = Object(); NullArray().Release();
NullFunction() = Function(); NullLightObj().Release();
NullFunction().ReleaseGently();
// Register the module API // Register the module API
if (RegisterAPI(DefaultVM::Get())) if (RegisterAPI(DefaultVM::Get()))
{ {

View File

@ -95,6 +95,7 @@ static void OnSquirrelTerminate()
NullObject().Release(); NullObject().Release();
NullTable().Release(); NullTable().Release();
NullArray().Release(); NullArray().Release();
NullLightObj().Release();
NullFunction().ReleaseGently(); NullFunction().ReleaseGently();
// Release script resources... // Release script resources...
} }

View File

@ -373,6 +373,7 @@ static void OnSquirrelTerminate()
NullObject().Release(); NullObject().Release();
NullTable().Release(); NullTable().Release();
NullArray().Release(); NullArray().Release();
NullLightObj().Release();
NullFunction().ReleaseGently(); NullFunction().ReleaseGently();
// Release script resources... // Release script resources...
} }