all true
same as this: 
http://www.clariusconsulting.net/blogs/vga/archive/2004/02/12/TheWorstNamedOperatorEver.aspx

Also, I am thinking if this is true : "Delete closure variables after
exiting functions to prevent memory leaks"
then what do we do about this in jQ file :

    jQuery.extend({
        cache: {},       // line #1274 approx...

maybe if one does delete this one (aka jQuery.cache ) that might
reclaim some "lost" memories ?

On Apr 20, 4:19 pm, "Michael Geary" <m...@mg.to> wrote:
> > > var orphan = this.parentNode.removeChild(this);
> > > delete orphan;  // DBJ added delete
>
> > > I think this might make jQ much slower ?
> > Just tested it, and this doesn't seem to fix the problem either :(
>
> Assuming that this code is inside a function, it could never fix a leak, but
> it could create one.
>
> The delete operator doesn't work on a local variable. It leaves the variable
> unchanged and returns false.
>
> So this delete can't help. But the "var orphan =" could cause a leak if this
> function invocation is kept around because of a closure.
>
> If you do want to remove a reference in a local variable, set it to null or
> undefined:
>
>   var orphan = this.parentNode.removeChild(this);
>   // do something with orphan here?
>   orphan = null;
>
> But if you're not using that "orphan" variable for anything, that code is
> equivalent to not having the variable at all:
>
>   this.parentNode.removeChild(this);
>
> -Mike
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to