Flex 2 : Adobe autocomplete component memory leak.

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.

This entry was posted in Flex. Bookmark the permalink.

3 Responses to Flex 2 : Adobe autocomplete component memory leak.

  1. Matt Chotin says:

    Hi, we’ll certainly see if we can take a look.

  2. Ralph says:

    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 ;-)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.