Do timers not get GC’d because they are running?
From what I can tell they don’t which means there must be some reference somewhere?
var t:Timer;
t=new Timer(50,1);
t.addEventListener(TimerEvent.TIMER_COMPLETE,tc,false,0,true);
t.start();
t=new Timer(50);
System.gc();
function tc(e:TimerEvent):void
{
trace('check1'); // check1
}
as far as I can tell in this example there is on reference to the timer as the original reference is re-assigned and the listener is a weak reference so the System.gc (ran in the stand alone player) should remove it. But it still calls the ‘tc’ function.
Any explanation of what is happening or where I am going wrong ?
Thanks for your consideration.