[jQuery] Cleaning up javascript before ajax load

[jQuery] Cleaning up javascript before ajax load


Hi there
I have an ajax based page, which loads content from external page (html
+js)
So if i have a div "update_div" being updated with external content
(html+js)
Let me be more specifig
Step1: Ajax content along with js loaded into update_div from a.html
Step2: Ajax content along with js loaded into update_div from b.html
What happens to the js loaded from a.html? Is it lurking in the memory
or automatically/magically removed from the browser memory?
I am afraid of memory leaks, if the js is still lurking in memory, the
more ajax calls made, the more js is going to be held up in memory.
Unless am totally wrong; i have no idea of the mechanism happening
here. Can somebody shed some ligth?
p.s: Hope my post doest go missing this time :)
Thanks
Vru