Closed WebReflection closed 11 years ago
The function is already being reused in the current implementation of maria.create
The only significant change in this pull request is the line
F.prototype = null;
I could add just that line.
oh, my bad ... didn't see that. So yes, obj is going to be an object in any case so you can reuse it without causing GC/JIT problems and dropping the prototype after ensures no leaks. Of course smart engines can avoid that but you stated this is going to work in IE6 too :-)
that Crockford pattern ... I never liked it that much. You can reuse the function since the magic happens when you
new
and nowhere else.