Hi everyone,
I was wondering, if I have a class with method consisting out of a bunch of code (say 10000 lines scattered over different methods). If I make 20 instances
of the class with the code be 'copied' into memory 20 times or (my guess) is the code loaded only once into memory and by means of references point to the block of code ?
I'm just asking this because if the code would be copied over and over, it would surely be a waste of memory but I can't really believe that this would be the case.
Cheers
Steven
I was wondering, if I have a class with method consisting out of a bunch of code (say 10000 lines scattered over different methods). If I make 20 instances
of the class with the code be 'copied' into memory 20 times or (my guess) is the code loaded only once into memory and by means of references point to the block of code ?
I'm just asking this because if the code would be copied over and over, it would surely be a waste of memory but I can't really believe that this would be the case.
Cheers
Steven
Comment