[DGD] Lightweight objects, arrays and copying
Noah Lee Gibbs
angelbob at monkeyspeak.com
Wed Jan 9 09:31:19 CET 2002
I'm sending this more to check an assumption than anything else. If
anybody sees anything blatantly wrong here, I'd be much indebted. It may
save me much debugging time.
My understanding is that arrays, mappings and lightweight objects, if
you pass them around, will be copied into the object they're passed to at
the end of the current thread's execution. To avoid this copying, which
would not only waste space but probably also destroy the usefulness of my
data structure, I'm keeping a single regular object which contains all the
lightweight objects I'm using for a given purpose. Basically I've got a
bag object full of all my LWOs.
The lightweight objects contain object members that point to each
other, which is fine since they're all sitting inside the same regular
object. They contain arrays of references to each other, so they're full
of circular references. That's fine, I can break all the circular
references prior to MUD shutdown so there shouldn't be any problem with
garbage collection.
My question (other than -- is all the above stuff true?) is whether the
bag object with all its LWOs will have to be swapped in all at once. If
it gets very big, will that be a serious problem?
--
angelbob at monkeyspeak.com
See my page of DGD documentation at
"http://www.angelbob.com/projects/DGD_Page.html"
If you post to the DGD list, you may see yourself there!
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list