J
Joost Diepenmaat
Thomas 'PointedEars' Lahn said:Thanks, I was looking for that. However, you should consider that the
increased runtime efficiency gained by declaring the Dummy() constructor
only once is mitigated by the reduced memory efficiency caused by the
continued allocation of memory due to the closure. And since there are
more issues with closures than without them, I would avoid them here.
function Dummy(){}
function extend(proto) {
Dummy.prototype=proto;
return new Dummy();
}
No closure. Though I would be amazed if it would have any significant
impact on memory use.
Joost.