Announcement

Collapse
No announcement yet.

Class memory usage

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

  • Bob Zale
    replied
    No, no, no, no no.... {smile)

    There is only one copy of the code. Ever.

    Bob Zale
    PowerBASIC Inc.

    Leave a comment:


  • Steven Pringels 3
    started a topic Class memory usage

    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
Working...
X