As I told before we are doing a pretty big Flex 2 project currently; great fun, and Flex is great. Yesterday we stumbled upon several memory leaks in the application (it’s still in development, and many things are not final, so logically, not all matter). The application could easily start consuming 100Mb, and never release the memory.
We finally managed to trace the source of the memory problem back to our logger view, in which I had implemented Adobe’s autcomplete component. The autocomplete component itself is great; thanks for that guys!
Strange thing was that except for our FDS & Cairngorm logging we didn’t have a whole lot of logging going on. Now we started to debug log some view things, and the amount of memory usage kept on rising.
After searching for several hours (and fixing multiple things) the Autocomplete component turned out to be the culprit.
I think it has something to do with the way it builds up the dictonary / bsp tree I assume it uses.
So; if any macrodobian is reading this : here’s an example of that leak (read explanation in left pane); and here’s the source to the example.
you may find this interesting, http://tech.groups.yahoo.com/group/flexcoders/message/48330
Hi, we’ll certainly see if we can take a look.
Matt : Thanks; looking forward to hear the reason of this behaviour…
Sam : Thank you for the link. I do think that that link more or less underlines the leakage problem. Furthermore, in the comments to that post Ted Patrick states that there is no way to force the garbage collection process; actually, there is :
try {
new LocalConnection().connect(‘foo’);
new LocalConnection().connect(‘foo’);
} catch (e:*) {}
Just to be complete