Does anyone here have experience downloading a large number of maps
using the Flash API & AIR?
We have an AIR application which we set to download approximately 2000
maps at a time. Unfortunately after about 500-600 or so maps, the
program has taken up all of the computers memory and the application
crashes.
The results may vary on different computers depending on what
resources they have, but there is certainly a memory leak somewhere.

The program only has 1 Map Object and follows an event driven process
that downloads maps 1 at a time into the Map object until it has
downloaded all of the maps.
All event listeners are removed along the way and redundant map data
is cleared out with the 'Map.unload();' function. I also make sure to
remove the Map from the display list each time.

I put the app through a flex profiling session and came up with the
following results:

It seems that each map is successfully unloaded from memory after it
has been downloaded.
The graph in the link below shows that the app is reclaiming memory:
http://uandidirect.com.au/images/Picture%202.png

After downloading 1 map we can see that there are a few loitering map
objects:
http://uandidirect.com.au/images/Picture%204.png

After downloading several more maps we can see that the amount of
loitering map objects has increased:
http://uandidirect.com.au/images/Picture%205.png

So it would seem that the program is able to unload most/some of the
maps objects, however not all of them, over time this adds up until
the program takes over all of the available memory.

Can anyone think of a better approach to clearing out the memory
cache?

regards
Ben
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API For Flash" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-maps-api-for-flash?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to