[DGD]Setting global variables from create()
James Gaunt
jamesgaunt at hotmail.com
Sat Jun 10 15:02:39 CEST 2000
Hi, I'm quite new to LPC coding so please have patience if this is a stupid
question...
If I have an object with a global variable (for example a string
representing its long description) and I set it from the create() function
i.e.
string desc;
void create()
{
desc="This is quite a long description";
}
Then is the long description stored twice in memory, once in the compiled
code of the object, and once in the global variable in the master object
(obviously with additional copies in any clones).
My concern is that if I create a lot of objects (for example rooms with
large descriptions) which aren't cloned at all (in which case I wouldn't be
too worried) then all the descriptions are stored twice, taking up valuable
memory.
If this is the case does anyone have any suggestions for getting around it,
or is it just a fact of life?
Regards
James
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list