It looks like there may be some circular logic going on there, as you are passing a reference to the function 'callback' within the function itself. I am a little hazy on stuff like that, but that could be the problem.
-- Josh ----- Original Message ----- From: Brandon Aaron To: jquery-en@googlegroups.com Sent: Wednesday, August 22, 2007 1:58 PM Subject: [jQuery] Re: bind/unbind leak Would you mind testing with the latest nightlies to see if this issue is fixed in the up coming 1.1.4 release? http://code.jquery.com/jquery-nightly.js http://code.jquery.com/jquery-nightly.pack.js -- Brandon Aaron On 8/22/07, abarton <[EMAIL PROTECTED]> wrote: The following code when ran in IE6 (not sure about 7) will produce some kind of leak. It can be identified by bringing up 'Windows Task Manager' and viewing the CPU Usage History. The CPU hits slowly increase over time. (Link against jquery-1.1.3.1.pack.js) Is there an error in my code? <html> <head> <script language="javascript" src="jquery.js"></script> <script language="javascript"> var timerTask; $(document).ready(function() { timerTask = window.setTimeout( callback, 500 ); }); function callback() { $( 'a' ).each( function( index ) { $( this ).unbind( 'click' ).click( 'linkClicked' ); this.onclick = null; }); window.clearTimeout( timerTask ); timerTask = window.setTimeout( callback, 500 ); } </script> </head> <div id="count"> </div> <div id="testing"> <a href="testing.html">Test</a><br/> <a href="testing.html">Test</a><br/> <a href="testing.html">Test</a><br/> <a href="testing.html">Test</a><br/> <a href="testing.html">Test</a><br/> <a href="testing.html">Test</a><br/> <a href=" testing.html">Test</a><br/> <a href="testing.html">Test</a><br/> <a href="testing.html">Test</a><br/> <a href="testing.html ">Test</a><br/> <a href="testing.html">Test</a><br/> <a href="testing.html">Test</a><br/> <a href="testing.html">Test</a><br/> <a href="testing.html">Test</a><br/> <a href="testing.html">Test</a><br/> <a href="testing.html">Test</a><br/> <a href=" testing.html">Test</a><br/> <a href="testing.html">Test</a><br/> <a href="testing.html">Test</a><br/> <a href="testing.html ">Test</a><br/> </div> </html>