# createClassObject best pratice?

**URL:** https://forum.kirupa.com/t/createclassobject-best-pratice/241106
**Category:** flash
**Created:** [October 10, 2007, 2:54am UTC](https://forum.kirupa.com/t/createclassobject-best-pratice/241106 "2007-10-10T02:54:20Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Uli](https://avatars.discourse-cdn.com/v4/letter/u/ccd318/32.png) [@Uli](https://forum.kirupa.com/u/Uli)
#### Post date: [October 10, 2007, 2:54am UTC](https://forum.kirupa.com/t/createclassobject-best-pratice/241106/1 "2007-10-10T02:54:20Z")

</div>

Hello,

I have a problem with flash as2.0 components… I can easily create instances but i am having a very hard time to get rid of them.

```auto

import mx.controls.ComboBox;
this.createClassObject(mx.controls.ComboBox,"imgCombo",10,{_x:10, _y:50});
this.destroyObject("imgCombo");
for (var a in this) {
	trace(this[a])
}
traces : 
WIN 9,0,45,0
_level0.reserved
_level0.focusManager
_level0.imgCombo
*/

```

So how can i delete this ■■■■ component??
