views:

31

answers:

1

I have a Flex web application where I am visualizing data (for different countries) in the form of charts. The data is in the form of CSV files. There are individual files for individual charts i.e. one file has all data pertaining to one chart for all countries.

I have a left navigation menu that allows one to see data on a country by country basis. As I view more and more countries, the web application becomes progressively slower till it freezes completely. The problem goes away if I refresh the browser and empty the cache.

I am using the URLLoader class in flex to read the CSV data into a string and then I am parsing the string to generate the charts.

I realize this is happening because more and more data is somehow accumulating in the browser. Is there any way in Flex to rectify this? Any pointers/help would be appreciated.

Thanks - Vinayak

+2  A: 

Like @OXMO456 said before my, I would use the profiler to check this issue. to refine my answer I would also say please make sure that you are following all of the rules for low memory in flex like 1. clearing out (removing) event listeners 2. nulling out static variables

and more like so.

I would use the "snapshot" feature of the profiler and see what is happening in minute 1 and then minute 2, the difference between the two of these is probably the source of your leak.

Avi Tzurel
Thanks @Avi. I do not have Flash Builder 4 (am on Eclipse Plug-in for Flex 3) therefore could not try out the profiler. However, clearing out the event listeners seems to have solved the problem. :-)
Vinayak