[jQuery] Memory leaks forever

[jQuery] Memory leaks forever


> it doesn't seem like it would help Franck's
> code as he's not removing any elements
It looked like Franck had only showed a part of his code so I thought there
must have been some places where he was removing elements. If not then the
leak would be occurring when the user reloads or navigates away from the
page.
> should some sort of auto-clean-up be run
> when the page is unloaded, for IE?
Seems like that's the only way to solve the leaks according to Doug's page.
> I do keep a reference to all events that were added
> using bind/addEvent, so that is a possibility.
That might be faster than doing what Doug did, looking through all
properties of the whole DOM subtree to see if there were any functions
attached.
-----Original Message-----
From: discuss-bounces@jquery.com [mailto:discuss-bounces@jquery.com] On
Behalf Of John Resig
Sent: Saturday, March 25, 2006 12:15 PM
To: jQuery Discussion.
Subject: Re: [jQuery] Memory leaks forever
Dave -
Doug's code is really interesting and it seems like it'd be simple enough to
integrate into the .html() .empty() and .remove() functions.
But I'm confused, it doesn't seem like it would help Franck's code as he's
not removing any elements - should some sort of auto-clean-up be run when
the page is unloaded, for IE? I do keep a reference to all events that were
added using bind/addEvent, so that is a possibility.
Let me know.
--John