# Timer Garbage Collection

**URL:** <https://forum.kirupa.com/t/timer-garbage-collection/314953>\
**Category:** flash\
**Created:** [October 13, 2010, 7:37am UTC](https://forum.kirupa.com/t/timer-garbage-collection/314953 "2010-10-13T07:37:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaedo](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@Shaedo](https://forum.kirupa.com/u/Shaedo)\
**Post date:** [October 13, 2010, 7:37am UTC](https://forum.kirupa.com/t/timer-garbage-collection/314953/1 "2010-10-13T07:37:44Z")

</div>

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?

```php
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.
