I know of Ruby GC having not counting :))))

Example.

In Windows while creating a window class I pass a reference to a brush
object. I do not know how does it store the reference. I know only I
should free the object via my reference when I unregister the class
since Windows does count references. I wrapped both window class object
and brush object references with Ruby objects. But in the mark phase I
receive from GC pointer to the reference to the window class object. I
can obtain the brush object from this reference. Even I can obtain VALUE
associated with this window class. But I cannot obtain the VALUE
associated with the brush object to pass it to the rb_gc_mark. :((((((( 

I see I need store the brush object in an instance variable. Thus Ruby
should mark it by himself.... I hope.... :|

# -----Original Message-----
# From: ts [mailto:decoux / moulon.inra.fr] 
# Sent: 13 ¥Î¥¿¥Õ¥à 2001 ¥Ì. 20:43
# To: ruby-talk ML
# Cc: ruby-talk / ruby-lang.org
# Subject: [ruby-talk:17802] Re: GC mark
# 
# 
# >>>>> "A" == Aleksei Guzev <aleksei.guzev / bigfoot.com> writes:
# 
# A> ... Can I increase the reference counter while not in "mark 
# A> phase".Just like in Python PyINCREF
# 
#  Can you give a small example of what you are trying to do, 
# because in ruby  a reference counter don't exist.
# 
# 
# Guy Decoux
# 
#