If I use multiple instances of the same object in my code, do the instance methods for each separate object require memory, or do all of those objects share the same instance methods?
It could have a big effect on memory use.
Thanks in advance for any insights.
John Doner
It might depend on the language you are using ;-)
In all language implementations that I'm aware of, the methods are shared. In most C++ implementations, for example, the method gets an implicit first parameter (this) that points to the particular instance of the object.