Flex 3: delete instance of a component?

hey champs,

Hoping someone can help me out here as I’m having no luck with this prob…

I have a Flex 3 AIR app with a TileList which loads thumbnails & source strings for videos. When a thumb is selected and a button is pressed the videos launch in a new window.

onButtonPress:

// create a new window & play the selected clip
private function playClip():void
{
if (clipDescription.length > 0)
{
var vp:FLVPlayer = new FLVplayer()
trace(“assets/flvs/”+galleryClipData.source);
vp.open(false);
vp.vidSource = (“assets/flvs/”+galleryClipData.source)
vp.addEventListener(Event.CLOSE, closeClip, false, 0, true); //?
}
}

“FLVPlayer” is a subclass of mx:window and has an FLVPlayback component I customised in Flash and imported through a SWC.

Using Flex profiling, I can see that multiple instances of FLVPlayer and its children get created (and hog memory!) each time I play a thumb.

Can anyone tell me how I go about deleting the “vp:FLVPlayer” instance when the window is closed?

Any help would be much appreciated!

cheers