[DGD]String sharing in DGD driver

Felix A. Croes felix at dworkin.nl
Thu Jun 14 16:20:41 CEST 2001


Noah Lee Gibbs <angelbob at monkeyspeak.com> wrote:

>   My understanding is that DGD does its swapping per-object.  That is, a
> given compiled object or clone is either entirely swapped in or entirely
> swapped out.  I further remember (I think) that string sharing is usually
> done on swap-in, so if I were to read strings out of a file or dynamically
> generate them, they'd only start to be shared after the object had been
> swapped out and back in.

>From the LPC point of view, strings are <not> shared.  The driver
internally may share strings in some cases where this is found to be
expedient, but this is hidden from LPC programs.


>   Is there a good way to share a single value over a whole class of
> objects?  For instance, I might wish to hold a single instance of a string
> shared by every "/usr/System/obj/user" object so that they all change 
> when I modify it for one of them.  Or do I need to just hold it in some
> other global manager for all the user objects to query?

You have to do it with some central object.

Regards,
Dworkin

List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list