From: Jeff Rose Date: 2006-05-28T18:41:54+09:00 Subject: Re: object.reference_count gene.tani@gmail.com wrote: > Jeff Rose wrote: >> Timothy Hunter wrote: >>> Jeff Rose wrote: >>>> Tim Hunter wrote: >>>>> Jeff Rose wrote: >>>>>> Is there a way to get the current reference count for an object? >>>>> AFAIK Ruby doesn't keep track of the reference count. If you're >>>>> coming from Python, keep in mind that Ruby uses a mark-and-sweep GC, >>>>> which is fundamentally different from Python's. >>>>> >>>> Aha. Didn't think about that. Are there callbacks or anything you >>>> can use to implement reference counting without having to use special >>>> methods for referencing an object? >>>> >>>> >>>> >>> Why don't you describe what it is you're trying to do? >> Just wondering... > > if you're using google groups you need to search the archives of > comp.lang.ruby, not ruby-talk > http://groups.google.com/group/comp.lang.ruby/browse_frm/thread/c9530bf2d5d892a3?tvc=1 Huh? I'm on the mailing list, and in googling around I didn't find information on reference counting, which makes sense given the garbage collector used. This spawned from a conversation with a friend who was working in C++ on a system that is all reference count based. He asked how it would work in ruby, and I didn't know. Thanks for the help Tim. -Jeff