Not just created, but properties are being populated one by one.
"can be garbage collected"
And what do you think is computational complexity of garbage collector?
Yes, memory allocation in JS (GCable environment) is cheap. But garbage collection per se is not, it is at least O(N) complex.
Not just created, but properties are being populated one by one.
"can be garbage collected"
And what do you think is computational complexity of garbage collector?
Yes, memory allocation in JS (GCable environment) is cheap. But garbage collection per se is not, it is at least O(N) complex.