views:

105

answers:

3

Hi, I have dynamically added a Flex Object in a HTML page through JavaScript. The Flex object is located in a "div" tag. Now when I call the "removeChild" JavScript function to remove the dynamically added "Object" tag, the object tag gets removed succesfully; however the memory that has increased due to the loading of the Flex Object is never recollected by IE. Even if I refresh the browser the memory is still not cleared. How do I recollect the memory that was allocayed to my Flex Object?

+1  A: 

Crockford's article on JScript Memory Leaks may help.

artistoex
Abhi
"memory that has increased due to the loading of the Flex Object is never recollected by IE"-- that sounds much like memory leaks, though
artistoex
+1  A: 

This is a guess: Have you tried adding the OBJECT tag statically, and only changing its SRC attribute to load your Flex Object? To unload presumably you could try setting SRC to empty string.

Simon B.
A: 

Finally the issue is resolved. IE does not free the SWF if you have exposed some Flex functions to Javascript using ExternalInterface, you need to clean the memory mannualy. Heare is a link that helped me to resolve the issue http://www.mail-archive.com/[email protected]/msg18731.html

Abhi