Yes, but when I click on the 'clean' button, Im unbinding and clearing out
the event, to avoid memory leak, but somehow the leak is still there.

When I click in the clean button, this code gets executed...

    var p = $("#container").find("p");
    p.unbind();
    p.get(0).onclick = null;

    $("#container").html("");

But I don't know what else I need to clear out to get rid of the memory
leak.


Klaus Hartl wrote:
> 
> Ethan Hannagan schrieb:
>> Thanks for your reply. I downloaded the latest from SVN and built it, but
>> I
>> still have the same memory leak. Anyhow I still can't figure out where
>> the
>> memory leak is, I'm not sure if it's my code or jQuery.
> 
> I think it's because you have a circular reference here, created by the 
> closure:
> 
> function bind() {
>      var p = $(this).find("p");
>      p.click(function(){});
> }
> 
> 
> -- Klaus
> 
> 
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Memory-leak-tf2792655.html#a7838041
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to