I can duplicate memory leakage in 1.1.4 with Firefox 2.0.0.6, but have
seen it in 1.1.3 and probably before. IE gobbles more memory but
eventually releases it. This could be a FF bug, but I haven't had the
chance to try duplicating with non-jquery javascript yet.

The following has a click that will slideToggle a div 1000 times on a
click. I lose about 10MB across the 1000 iterations. Seems to happen
for hide/show/toggle/etc.

<html>
<head>
        <script type="text/javascript" src="http://code.jquery.com/jquery-
latest.pack.js"></script>
</head>
<body>
<a href="#" id="clicktest">Toggle</a>
<div id="test"><p>Lorem ipsum dolor sit.</p></div>
</body>
<script language="javascript">
$(document).ready(function(){
        $("#clicktest").click( function(){
                for(i=0;i<1000;i++)
                        $("#test").slideToggle(10,function()
{setTimeout(';',50)});
        });

});
</script>
</html>



On Aug 28, 10:23 am, "John Resig" <[EMAIL PROTECTED]> wrote:
> In what browser are you seeing this?
>
> --John
>
> On 8/28/07, CM-Z <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello! I use utility Drip (http://www.outofhanwell.com/ieleak/
> > index.php?title=Main_Page) for the control of memory-leak.
> > The Drip shows memory-leak even in such simple case:
>
> > <html>
> >     <head>
> >         <script type="text/javascript" src="jquery-1.1.4.js">
> >         </script>
> >         <script type="text/javascript">
> >         $(document).ready(function() {
> >             $('.hover').click(
> >                 function() { $(this).text('clicked'); }
> >             );
> >         });
> >         </script>
> >     </head>
> >     <body>
> >         <div class="hover">click me</div>
> >     </body>
> > </html>
>
> > It is a bug in Drip or in jQuery?
>
> > Sorry for my bad English.

Reply via email to