Announcement

Collapse
No announcement yet.

Class memory usage

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Class memory usage

    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
    So here we are, this is the end.
    But all that dies, is born again.
    - From The Ashes (In This Moment)

  • #2
    No, no, no, no no.... {smile)

    There is only one copy of the code. Ever.

    Bob Zale
    PowerBASIC Inc.

    Comment

    Working...
    X