Actually, no leaks at all, almost the same elapsed time, and weird enough
apparently leaks are with Firefox and expando integer.

This is the test I have used, please note it could be stressful via Firefox:

onload = function(){
    alert("snap"); // use alert/snaps to monitor memory usage via task
manager
    for(var i = 0, body = document.body, t = new Date, div; i < 20000; ++i){
        div = body.appendChild(document.createElement("div"));
        div.expando = new Number(i);
    };
    alert(new Date - t);
    div = i = null;
    t = new Date;
    body.innerHTML = "";
    alert(new Date - t);
    for(var i = 0, body = document.body, t = new Date, div; i < 20000; ++i){
        div = body.appendChild(document.createElement("div"));
        div.expando = i;
    };
    alert(new Date - t);
    div = i = null;
    t = new Date;
    body.innerHTML = "";
    alert(new Date - t);
};

Regards

On Sat, Oct 17, 2009 at 5:48 PM, Andrea Giammarchi <
andrea.giammar...@gmail.com> wrote:

> expando is removed when necessary while new Number is an instance of Object
> but basically just an integer, I can't spot side effects here but if you
> have a test about this I'll have a look.
>
>
> On Sat, Oct 17, 2009 at 3:31 PM, Dave Methvin <dave.meth...@gmail.com>wrote:
>
>>
>> > #38     elem[ expando ] = new Number(id);
>>
>> I thought there were memory leaks when attaching Javascript objects to
>> DOM expandos in IE.
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
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