# Removing (deleting) arrays

**URL:** <https://forum.kirupa.com/t/removing-deleting-arrays/290626>\
**Category:** Uncategorized\
**Created:** [June 17, 2009, 11:06am UTC](https://forum.kirupa.com/t/removing-deleting-arrays/290626 "2009-06-17T11:06:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![werehunt](https://avatars.discourse-cdn.com/v4/letter/w/b782af/32.png) [@werehunt](https://forum.kirupa.com/u/werehunt)\
**Post date:** [June 17, 2009, 11:06am UTC](https://forum.kirupa.com/t/removing-deleting-arrays/290626/1 "2009-06-17T11:06:11Z")

</div>

not elements in arrays but arrays themselves;

I am generating lots of arrays in a for loop again and again.

It it possible to delete these subArrays from the mainArray so that they dont exist any more?

```auto
var mainArray:Array = new Array();  
for (var i:int = 0; i< columns; i++) {
      var subArray:Array = new Array();            
      mainArray.push(subArray);
}

```

I forgot to write:  
I am pushing movieClips into these subArray in this same for loop and later on, I am removing these movieClips from subArrays, but these subArrays (after being cleaned) still remain in mainArray, dont they?
