Is this enough?

I’m adding a (MovieClip / Class that extends MovieClip) from the library (using linkage) during runtime. This class has it’s own loader and loads and displays a couple of bitmaps.

This is the code:

    
private function contactView(e:MouseEvent):void
  {
           var _contactView:Contact = new Contact();
            
            _contactView.name = "Dynamic";
            
            position(_contactView);
            addChild(_contactView);
 }
        
private function mainView(e:MouseEvent):void
{
            removeChild(getChildByName("Dynamic"));
}

My question is, is using removeChild enough to make the instance of the class (_contactView) eligible for garbage collection? Cause the only reference to the instance (the var) is inside the function, and not a private var in the class or something like that - if that were the case then I’d have to nullify the var too right?

Help would be very appreciated! :hangover: