Hi,
I was wondering if there is a similar .finalize() method for Ruby objects, that marks them ready for garbage collection. If I would create 20,000 objects and each instance has a counter, I would like the object to be marked for garbage collection when reaches zero. I know this is pretty much a Java approach, but I have not sufficient experience with Ruby under-the-hood to understand how this could be done better.
Thank you for your answers, comments and feedback!