# Timer and setInterval leaks memory

**URL:** https://forum.kirupa.com/t/timer-and-setinterval-leaks-memory/273890
**Category:** flash
**Created:** [October 22, 2008, 4:55am UTC](https://forum.kirupa.com/t/timer-and-setinterval-leaks-memory/273890 "2008-10-22T04:55:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)
#### Post date: [October 22, 2008, 4:55am UTC](https://forum.kirupa.com/t/timer-and-setinterval-leaks-memory/273890/1 "2008-10-22T04:55:34Z")

</div>

Set up a timer to tick every second (or an interval). Monitor the memory usage of your application.

You’ll see that it tags on like 10kb to the memory usage every 5-6 ticks. This never gets freed.

Had something really simple like;

```auto

		public function main() 
		{
			_timer = new Timer(1000);
			_timer.addEventListener(TimerEvent.TIMER, report, false,0, true);
			_timer.start();
		}
		private function report($e:TimerEvent):void
		{
		
		}

```

And nothing in the fla. So it literally does nothing but tick every 1 seconds and this increases the memory usage with 10-15kb every 4-5 seconds. I let it run for an hour and it never gets freed.

What sort of evil BS is this ☹
