# Memory Management

**URL:** <https://forum.kirupa.com/t/memory-management/255418>\
**Category:** programming\
**Created:** [March 22, 2008, 7:00am UTC](https://forum.kirupa.com/t/memory-management/255418 "2008-03-22T07:00:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eyenstyn](https://avatars.discourse-cdn.com/v4/letter/e/838e76/32.png) [@Eyenstyn](https://forum.kirupa.com/u/Eyenstyn)\
**Post date:** [March 22, 2008, 7:00am UTC](https://forum.kirupa.com/t/memory-management/255418/1 "2008-03-22T07:00:37Z")

</div>

Hi, i have created a vertical shooter similar to Clean Asia.

The problem with it, is that when the file reloads itself the objects on screen aren’t fully removed.

I have used the method of creating a for loop that removes child at 0, to remove all children from the stack, and i made sure to decrement it as to not skip children. This did not help as the fire from the enemy units were not removed. This also created a problem when the screen reloaded there were no objects on screen.

I am a bit reluctant to show all the coding i did on my game but i will post the game on this thread. If you can assist me, pm me and i will pm u the code.

These are some features of my code:

- I am using external swf files to load the levels.
- I am using a lot of timer classes which i remove the listeners for when i create a new game.

Thanx.
