Re: [Ironruby-core] Adding a finalizer to a ruby object

2010-01-11 Thread Tomas Matousek
...@rubyforge.org] On Behalf Of Jimmy Schementi Sent: Monday, January 11, 2010 12:45 AM To: Subject: Re: [Ironruby-core] Adding a finalizer to a ruby object Ivan, I'm not sure but I've asked the rest of the team and someone will get back to you shortly. ~Jimmy On Jan 11, 2010, at 12:00 AM, &

Re: [Ironruby-core] Adding a finalizer to a ruby object

2010-01-11 Thread Ivan Porto Carrero
oh if that is the case can they also get back to me with overriding an indexer (http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3392)? I think that would result in a complete chapter with regards to CLR interop. Thanks a lot :D --- Met vriendelijke groeten - Best regards - Salutations I

Re: [Ironruby-core] Adding a finalizer to a ruby object

2010-01-11 Thread Jimmy Schementi
Ivan, I'm not sure but I've asked the rest of the team and someone will get back to you shortly. ~Jimmy On Jan 11, 2010, at 12:00 AM, "Ivan Porto Carrero" mailto:i...@flanders.co.nz>> wrote: I specifically wanted to find a counterpart for this C# public class SomeClass { private object _u

Re: [Ironruby-core] Adding a finalizer to a ruby object

2010-01-10 Thread Ivan Porto Carrero
I specifically wanted to find a counterpart for this C# public class SomeClass { private object _unmanagedResource; public SomeClass(object unmanagedResource){ _unmanagedResource = unmanagedResource; } ~SomeClass(){ _unmanagedResource.Cleanup(); _unmanagedResource = null

Re: [Ironruby-core] Adding a finalizer to a ruby object

2010-01-10 Thread Sam Clopton
Ivan Porto carrero wrote: > Hi > > 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 > ObjectSpace.garbage_collect > Calling System::GC.collect had the same outcome > > and implementing a Finalize me

Re: [Ironruby-core] Adding a finalizer to a ruby object

2010-01-09 Thread Ilya
Garbage collection in Ruby is kind of tricky. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

[Ironruby-core] Adding a finalizer to a ruby object

2010-01-08 Thread Ivan Porto Carrero
Hi 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 ObjectSpace.garbage_collect Calling System::GC.collect had the same outcome and implementing a Finalize method doesn't seem to have any effect either cl