Hi,
when ruby finished executing code, it will invoke the GC to claim all
remaining objects.

Is the order, in which the GC claims the objects at this point, defined
at all or does it claim them in undefined order?

If it's defined, how does it decide whether object A or object B should
be claimed first?

Background:
In my Ruby extension, there are "parent" objects and "child" objects.
The "parent" object must not be freed if there are still "child" objects
alive. I enforce this policy by using rb_gc_mark(). This seems to work,
cause there are no problems as long as the ruby script executes.

However, when I quit the application, the GC seems to break this policy.

Thanks in advance for any hints,

-- 
Regards,
Tilman