faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 16 people (13%) answered Yes
Recently 0 of 10 people (0%) answered Yes

Entry

should i run a script that delete all objects in a page when user closes it, to free up memory? thx
What kind of an answer is that? Browser garbage collection sucks!

Apr 5th, 2008 19:32
ha mo, b w, Colin Fraser, ric wong, Donkey,


Memory resources are browser and operating system issues, not 
Javascript. Why try to reinvent the wheel?
If your script takes up enough RAM that delay in garbage collection from
the browser is significant, then you should redesign your script, not
try to apply half-assed patches that clean up the mess it makes.
Especially that reliably launching this kind of script is
near-impossible because onUnload event happens only under quite lucky
circumstances.
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com