[DGD] LWO question
Felix A. Croes
felix at dworkin.nl
Wed May 1 01:44:24 CEST 2002
Jay Shaffstall <jshaffst at netwalk.com> wrote:
> I've just begun playing around with light-weight objects, so if these
> questions are answered elsewhere, please let me know where.
>
> I wasn't certain what the new_object docs meant when it said, "If the
> master object is itself a light-weight object, it will be copied." There
> seemed to be at least three possibilities, so I wrote some simple code to
> test it out.
>
> What I'm finding is that a shallow copy appears to be done...primitive data
> types are copied, but mappings (and I'm assuming other reference types)
> seem to be shared.
>
> Is this the correct behavior?
Good question.
It doesn't seem right that the copied LWO will share an entirely local
array or mapping with the original. On the other hand, if that
datastructure is already shared outside of the original LWO, it
definitely should not.
I will think about this and see if I can come up with a good solution.
Regards,
Dworkin
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list