# Array deletion - simple question

**URL:** <https://forum.kirupa.com/t/array-deletion-simple-question/309202>\
**Category:** flash\
**Created:** [May 9, 2010, 6:34pm UTC](https://forum.kirupa.com/t/array-deletion-simple-question/309202 "2010-05-09T18:34:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrjellybeans](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@jrjellybeans](https://forum.kirupa.com/u/jrjellybeans)\
**Post date:** [May 9, 2010, 6:34pm UTC](https://forum.kirupa.com/t/array-deletion-simple-question/309202/1 "2010-05-09T18:34:05Z")

</div>

Hey all,

When I’m removing an object from the display list (via removeChild), I’m performing a splice on all of the arrays that the object has:

```auto

public function onDeath():void {
   arEnemy.splice(0,arEnemy.length);
}

```

My thinking was that this frees up some memory similar to disposing a bitmapdata.

Does this even do anything? Or, will arrays be cleared and the memory usage restored when the object is removeChilded?
