[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Memory Leak

I have created a monster in Flex V3.0 (SDK 3.5).

The monster is effectively a group of tools that allow me to create
applications with an Oracle DB back end somewhat efficiently. The front end
is quite lovely, and generally works well. However, I am using module
loader, and when I unload modules I do not get my memory back in most cases.

I have succeeded in creating very small modules that do very little, and
they will give up their memory when unloaded, but anything beyond one or two
fields causes the memory leak.

The application that is currently causing the most grief has many (> 100)
main modules each which references a number of of core objects which are sub
classes of things like combo boxes and text input, etc. 

Two things I did to try to resolve the issue are;

1) Change every add event to use a weak reference.

2) Added a group of code to override add & remove event listeners, track
them and create a routine that removes all event listeners during the
unloading of a module by looping through every object and running a clear
events method.

Unfortunately I have not been able to find a way to track down the offending
references so that I know where to look to fix things.

This is a mess of my own making, but I sure could use some help tracking
down the culprits and squashing them.

What is my next step?

Sent from: http://apache-flex-users.2333346.n4.nabble.com/