Hi,
When I create many objects new Machine like this
```
function Machine(power) {
var enabled = false;
this.enable = function() {
enabled = true;
};
this.disable = function() {
enabled = false;
};
}
var machines = []
for(var i=0; i<10000; i++) machines.push(new Machine)
```
...I see in Chrome Heap Profile that every object has 36 bytes for function
enable/disable.
That is so even if the function code is actually longer.
Do I get it right that V8 actually creates these functions only ONE time
and uses it for all machines?
--
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.