Formidastic, now when nillifying the Test1 and Test 3, the destructor of the SCHEDULER is called

The references of nillified and garbage collected SCHEDULERS are removed
from the _TIMERDISPATCHER. This results now in schedules that are still
pending to be executed, but are nillified, that these schedules will
never be executed!!!

Sven
This commit is contained in:
FlightControl
2016-12-12 17:41:58 +01:00
parent b81b483f0b
commit 15134d7f4e
4 changed files with 34 additions and 22 deletions

View File

@@ -42,15 +42,21 @@ end
do
local Test1 = TEST_BASE:New( "Hello World Test 1" )
Test1 = nil
BASE:E( Test1 )
end
local Test2 = TEST_BASE:New( "Hello World Test 2" )
Test2 = nil
local Test3 = TEST_BASE:New( "Hello World Test 3" )
Test3 = nil
collectgarbage()
BASE:E( Test2 )
BASE:E( Test3 )
BASE:E( "Collect Garbage executed." )
BASE:E( "You should only now see Test 3!" )
BASE:E( "Check if Test 1 and Test 2 are garbage collected!" )
BASE:E( "You should only see a Hello Worlld message for Test 2!" )
BASE:E( "Check if Test 1 and Test 3 are garbage collected!" )