It was my assumption that during shutdown the objects would be freed
leaf objects first, and a mark and sweep like approach. It seems however
that Ruby just walks an object table and frees each in entry order.

For native (C/C++) object graphs this can lead to out of order
deallocations. In my particular case this leads to a SEGV.

I was hoping to avoid pulling in Boost to add reference counting, was
hoping that the GC integration with Mark and Sweep would help, but it
would appear it does not?

Would someone please comment on approaches to systematically free C++
objects (in a Ruby C Extension) in the proper order?

Am I left solely with a reference counting approach?

Thanks,

Bob

-- 
Posted via http://www.ruby-forum.com/.