2 Replies Latest reply on Dec 18, 2007 7:48 AM by gdoumenc

    Deleting a child..

      In the manual, we can found :


      The removeChild() and removeChildAt() methods do not delete a display object instance entirely. They simply remove it from the child list of the container. The instance can still be referenced by another variable. (Use the delete operator to completely remove an object.)

      But you cannot delete an object (only a dynamic property..). So how can we do it?
        • 1. Re: Deleting a child..
          JKohn99 Level 1
          Welcome the the world of garbage collection. You must ensure that there the child object is not referenced by any other object and the Garbage collector will delete the object. This can be tricky in Flex 2.0, but in Flex 3.0 you can use the profiler tools to track references and ensure that objects are deleted.
          • 2. Re: Deleting a child..
            gdoumenc Level 1
            Thanks for your welcome :) ... If you have experience : is there any standard hidden reference other than event listeners..?

            Anyway thanks for your answer..