My problem is my Flex app would eats up memory over long period of browsing different states/screens because they never get destroyed. I am thinking about setting all my 'screen components' itemDestructionPolicy to auto.
Can anyone give me some tips/guidance if this is a good idea ? Some people are saying that it is better to never destroy components, because it takes longer time to rebuild a screen, but how would I solve this memory problem ?
Help ?? Anyone ??
I would first recommend using the profiler to identify the root source of
memory consumption. Let's say that a large UI widget takes about 5K of
memory. Let's say you have about 50 in each view. That's 250K per view.
Let's say you have 30 views. That's only 7.5MB.
If you are keeping separate data sets in each view, maybe centralize them if
they can be shared.
Thanks Harui.. is profiler included in the basic version of flash builder ? cause I can't seem to find it.
However, in general, is there any recommendation on when or where to set itemDestructionPolicy to auto ?