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

@@ -69,11 +69,17 @@ function SCHEDULER:New( TimeEventObject, TimeEventFunction, TimeEventFunctionArg
self.StartTime = timer.getTime()
_TIMERDISPATCHER:AddSchedule( self )
self.CallID = _TIMERDISPATCHER:AddSchedule( self )
return self
end
function SCHEDULER:_Destructor()
--self:E("_Destructor")
_TIMERDISPATCHER:RemoveSchedule( self.CallID )
end
@@ -89,4 +95,3 @@ end