1 Reply Latest reply on Mar 19, 2008 1:23 PM by ntsiii

    when are components destroyed

    _Cedric_ Level 1
      I'm writing a slideshow app. Each slide is custom component.
      If i add an instance of a custom component to a canvas using addChild method and afther a while i use
      canvas.removeAllChildren().
      Is the instance of the component destroyed or do i need extra code?

      var mySlide:CustClass;
      canvas.addChild(mySlide);
      ...
      canvas.removeAllChildren();
      //is mySlide completely destroyed?

      tnx




        • 1. Re: when are components destroyed
          ntsiii Level 3
          If there are no references to the component when "garbage collection" runs, the memory will be reclaimed. However, many things, including binding, create references that will exist when not expected. Google "Flash Player garbage collection" for lots more details.

          Tracy