[DGD] Leaf objects

Felix A. Croes felix at dworkin.nl
Mon Jul 27 13:27:47 CEST 2015


Blain <blain20 at gmail.com> wrote:

> I noticed in your cloud server you use leaf objects for cloning.  May I ask
> what the benefit of this is?

To explain, a leaf object is an object which is not inherited by any
other, and the cloud server lib automatically generates a leaf object
when you are trying to clone from a /lib/ object, and clones from that
instead.  The purpose is to ensure that no object you clone from is
inherited by any other, while allowing one to clone from a /lib/ object
as a shortcut.

Objects that can be inherited should never be used to clone from, since
that prevents the clones from being upgraded.  An inherited object can
only be upgraded by first destructing and then recompiling it, while a
leaf object can be recompiled in place, without destructing it; this
will also upgrade all clones of the leaf object.

Regards,
Felix Croes



More information about the DGD mailing list