I have a view stack. Within that I have 2 states, which are
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
I delete the children of a vbox when those of the other are
But the instance of my renderers (not the cumulative, but
real instances) grow, grow and grow, although I delete them via
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...
Or should I give up to the mystic Garbage Collector.
ps: This behavior hold on mac and pc (on Flex beta 3 and Flex
You can use the profiler to investigate the back references.
Take a memory snapshot in the beginning.
Then switch between view stack and back to the original one.
Take another memory snapshot.
Open Loitering objects using the two snapshots and look at
the potential leaks and investigate the back references.