# Flash Profiler says I'm creating a new game instance once per frame... !?

**URL:** <https://forum.kirupa.com/t/flash-profiler-says-im-creating-a-new-game-instance-once-per-frame/304061>\
**Category:** flash\
**Created:** [February 1, 2010, 12:06am UTC](https://forum.kirupa.com/t/flash-profiler-says-im-creating-a-new-game-instance-once-per-frame/304061 "2010-02-01T00:06:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ls\_ac](https://avatars.discourse-cdn.com/v4/letter/l/eada6e/32.png) [@ls\_ac](https://forum.kirupa.com/u/ls_ac)\
**Post date:** [February 1, 2010, 12:06am UTC](https://forum.kirupa.com/t/flash-profiler-says-im-creating-a-new-game-instance-once-per-frame/304061/1 "2010-02-01T00:06:48Z")

</div>

My profiler screen shot:  
[http://img188.imageshack.us/img188/9711/60192648.jpg](http://img188.imageshack.us/img188/9711/60192648.jpg)

“Hilights” is my game class, which is also my Document Class. Though the “Instances” count never goes above 1, as you can see, the “Cumulative Instances” increases at a rate of one per frame.

In the ADDED\_TO\_STAGE event, I have a “stop()” line to prevent it from looping. In addition, I’ve put traces in the class Constructor, in the ADDED event, and the ADDED\_TO\_STAGE event, but none of them are being called repeatedly. The game functions fine, aside from a strange 4kb memory leak that gets GCd after a few megs. I suspect that leak may be tied to this weird “instancing” behaviour.

What could be causing this odd behaviour?
