[Ironruby-core] Adding a finalizer to a ruby object
lists at ruby-forum.com
Mon Jan 11 00:12:25 EST 2010
Ivan Porto carrero wrote:
> How do I add a finalizer to a ruby object?
> I've tried using ObjectSpace and define_finalizer.
> But the proc never got executed when I called
> Calling System::GC.collect had the same outcome
> and implementing a Finalize method doesn't seem to have any effect
> class MyClass
> def Finalize
> puts "in Finalize"
> def finalize
> puts "in lower finalize"
What about using a proc, or block and running finalize after yield or
Posted via http://www.ruby-forum.com/.
More information about the Ironruby-core