# Remove Classes From Array

**URL:** <https://forum.kirupa.com/t/remove-classes-from-array/329827>\
**Category:** flash\
**Created:** [October 21, 2012, 2:52pm UTC](https://forum.kirupa.com/t/remove-classes-from-array/329827 "2012-10-21T14:52:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![molkman](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@molkman](https://forum.kirupa.com/u/molkman)\
**Post date:** [October 21, 2012, 2:52pm UTC](https://forum.kirupa.com/t/remove-classes-from-array/329827/1 "2012-10-21T14:52:44Z")

</div>

Hello friends,  
here’s another AS3 question from me that got me quite puzzled. I have a lot of classes put in an array to easily adress them. Like this:

```auto
var newClass:NewClass = new NewClass ;
niceArray.push(newClass)

```

Now at one point of the program, I want to delete those classes and add them in anew without the old ones acting anymore.

I tried to simply erase the Array contents like

```auto
niceArray = []

```

or

```auto
niceArray[0] = null

```

but classes, that got a child still on screen don’t “vanish”, so I believe, also classes that have been erased from the array still “act” and therefore take up capacities and lead to bad performance if I repeat the process a few times.

Is there a safe way to get rid of classes that have been called in a program or at least stop them from acting?

Thanks!
