The garbage collector does not require reference counts. Ruby currently uses conservative "mark and sweep" for automatic garbage collection (GC), and will soon be using generational GC. There is no need to keep track of reference counts in your C extensions. Simply provide functions for the GC to use for marking objects and freeing memory.
One consequence to this approach is that you also have less control over the destruction of an object. Of course, you can use GC.start to force cleanup early, and you can also temporarily disable it to prevent code blocks from being interrupted. You can use finalizers to run a procedure after the object is destroyed, but this is not really a destructor.