Stunt and recursive anon object references

2 views
Skip to first unread message

Leviathan-7

unread,
May 18, 2018, 6:21:14 PM5/18/18
to MOO Talk
i understand that stunt anonymous objects are killed when they're no longer referenced but i noticed that i could set a property of an anonymous object to itself. after loading it with a lot of junk data to bloat it in size and removing the only 'real' reference to it, i noticed the next checkpoint didn't bring down the disk size to a number near the size of the anonymous object. is there any way to clear out anonymous objects that only have references to them in their own data?

Leviathan-7

unread,
May 18, 2018, 6:43:56 PM5/18/18
to MOO Talk
nevermind, i discovered that on startup such objects are removed.

Todd Sundsted

unread,
May 19, 2018, 9:10:47 AM5/19/18
to MOO Talk
you should also be able to force a garbage collection run by invoking `run_gc()` as a wizard

Leviathan-7

unread,
May 19, 2018, 2:09:12 PM5/19/18
to MOO Talk
very handy, thank you!

Leviathan-7

unread,
May 19, 2018, 2:13:06 PM5/19/18
to MOO Talk
is there a list of these functions? i can't find one.

Todd Sundsted

unread,
May 19, 2018, 3:00:28 PM5/19/18
to MOO Talk
The documentation/manual still needs some work.

Leviathan-7

unread,
May 23, 2018, 12:17:47 PM5/23/18
to MOO Talk
on the chance you know off the top of your head, what can cause anonymous objects to invalidate? it seems that out of nowhere, ones existing in properties on my player object just lose their parent, by which i mean attempting to call parent() on them returns E_INVARG.

Leviathan-7

unread,
May 23, 2018, 1:15:01 PM5/23/18
to MOO Talk
more specifically, it appears as if they're recycled despite them not being de-referenced

Leviathan-7

unread,
May 23, 2018, 1:47:57 PM5/23/18
to MOO Talk
i think i figured it out; adding a property to a parent of an anonymous object invalidates it instantly and so does removing a property from that parent. unfortunate but i'm assuming there's a good reason why

Todd Sundsted

unread,
May 26, 2018, 12:11:06 PM5/26/18
to MOO Talk
The answer is in the other thread. Bottom line, it's not trivial to correctly fix up anonymous children when parent properties change.
Reply all
Reply to author
Forward
0 new messages