I belive i got an answer
.
Thanks for the replies.
This is how it happens.
1) calculate the size of an object - the size is mostly the same as that of the class but can vary. When the object in question is not derived from a class, but from a prototype instead, the size of an object is usually that of the internal data structure (a hash for instance) that holds its slots.
2) allocation - allocating memory space with the size of an object plus the growth later, if possible to know in advance
3) binding methods - this is usually either left to the class of the object, or is resolved at dispatch time, but nevertheless it is possible that some object models bind methods at creation time
4) calling an initializing code (namely, constructor) of superclass
5) calling an initializing code of class being created