1 Reply Latest reply on Mar 10, 2008 8:50 AM by Gaurav J

    Garbage collection problem

    CesareRocchi
      Hiyall,

      I have a view stack. Within that I have 2 states, which are vboxes.
      As a I load stuff from the internet I add a renderer (via as) to the corresponding vbox (same renderer for the two vboxes).
      During profiling, I noticed that memory grows, grows and grows.
      I delete the children of a vbox when those of the other are loaded.
      But the instance of my renderers (not the cumulative, but real instances) grow, grow and grow, although I delete them via vbox.removeChildren().

      My renderer class contains a loader with two listeners (weak referenced), but I remove them via removelisteners() when stuff is loaded, and then set the loader to null.

      But the memory grows, grows, grows.

      Sometimes, but very very rarely, the GC wipes out old instances. But that happens very very rarely. Usually memory consumption goes up up up.

      I feel I tried everything I could...

      Any hint?
      Or should I give up to the mystic Garbage Collector.

      ps: This behavior hold on mac and pc (on Flex beta 3 and Flex 3 final).