Originally Posted by rnd me
Functions are objects. Objects are passed byRef. this is determined at execution time. It's not safe to say that 100 distinct yet identical mallocs will result from the method...
You overlooked the fact that new
is being used to make the copies.
A simple way to prove that separate copies of the method exist for each object after creating them using 'new' would be to update the code in the original method. You will soon see that it does not update the copies of that method that have already been made using 'new'.
It is only when you don't use 'new' that objects are passed by reference.
Helping others to solve their computer problem at http://www.felgall.com/