17 Replies Latest reply on Aug 14, 2007 11:48 AM by kglad

    removing pre-placed movieclips

    Psycho_Mantis
      I want to remove a movieclip instance which was manually placed on stage. The movieclip has the instance name 'deleteme'. It has no class, and thus no event listeners. Also, I'm sure there are no further references to it somewhere in my fla. this is my code:

      this.removeChild(deleteme);
      trace(deleteme); //returns [object loadObjectsHolder_1]
      deleteme = null;
      trace(deleteme); //returns null

      The Movieclip, however, isn't collected by the garbage collector when it makes its sweep (I watch it by keeping track of System.totalMemory). I know this because I put a trace inside the to-be-removed MovieClip. I'm sure this doesn't interfere with the GC (tested it before). What more need I do to make it removable for the GC?