posted 18 years ago
No, each method does not contribute to the size of each object; methods, and information about methods, is stored just once.
There are many ways to implement this, and the details of the implementation change from time to time, but all are variations on the classic vtbl approach. Every object does have a reference to a class-wide data structure. Part of that data structure is a list of methods and reference to the code for each method. To invoke a method on an object, the VM follows the chain of references from the object, to the class, to the code for the method.