$(top).unload(function() { /* clean after yourself here */ });
Might this help ? On Apr 16, 4:35 pm, Danny Tuppeny <danny.tupp...@gmail.com> wrote: > Hi John, > > That seems to remove many of the leaks, but still leaves a comment, a > script, a form and 3 DIVs. The script is caused by the removeChild > just after the code you posted. Not had chance to check where the > others come from, might try and dig into it more when I get home. > > All of the elements are generally empty, so I think every case is from > the "testing" stuff in jQuery.support. > > If you want to dig in the meantime, you can get Drip 0.5 here: > > http://www.outofhanwell.com/ieleak/index.php?title=Main_Page > > Doesn't need installing, just give it jquery.com, click "Go" then > click "Show Leaks". It'll unload the page and show any dom elements > left around. > > On Apr 16, 3:52 pm, John Resig <jere...@gmail.com> wrote: > > > Hmm - I wonder if it has to do with the attachEvent that we're testing. > > > If you comment out these lines, does the leak still exist? > > if ( div.attachEvent && div.fireEvent ) { > > div.attachEvent("onclick", function(){ > > // Cloning a node shouldn't copy over any > > // bound event handlers (IE does this) > > jQuery.support.noCloneEvent = false; > > div.detachEvent("onclick", arguments.callee); > > }); > > div.cloneNode(true).fireEvent("onclick"); > > } > > > --John > > > On Thu, Apr 16, 2009 at 9:18 AM, Danny Tuppeny <danny.tupp...@gmail.com> > > wrote: > > > > Hi all, > > > > I've been using Drip to try and track down some memory leaks in my > > > app, but as I started stripping code out, I discovered a simple blank > > > page including jQuery seems to leak. The elements seem to be all those > > > created by the jquery.support object (script, a, divs). > > > > Happens in IE7 and IE8. If you run Drip on the jquery.com homepage > > > you'll see all the elements leaked. > > > > Is this a known issue? Is there any ETA for a fix? > > > > Our application is likely to be open in a browser for the entire day > > > (with lots of page loads), so we're keen to plug any leaks. I can > > > provide more info if needed, but just running Drip 0.5 on the > > > jquery.com homepage should show what I'm talking about. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---