RE: [Rubydotnet-developer] Garbage collection - again
Status: Alpha
Brought to you by:
thomas
From: Ben S. <bsc...@pr...> - 2003-09-12 14:20:50
|
Hi Thomas, > I just grepped through your code and you don't seem to use the > rb_gc_(register|unregister)_address functions. Do you know=20 > another trick for > keeping the ruby GC from reaping the ruby objects that are=20 > only referenced > from .net? We keep a hash of all of the Ruby objects we've ever referenced from = .NET. It is pretty low-tech, but works to keep the GC from harvesting = the objects. (We actually never release them - proper GC is something = we still need to work on.) This may not have been in any version that you have - there are some = Ruby-in-.NET improvements in our R3 release (due soon). > Btw, I have just thought of something! The .net GC runs=20 > asynchronously and > the finalizer may just be invoked on a bad time causing=20 > everything to bomb > because ruby is not thread safe. That sounds like it could be the case - I hope you find the problem! If = you want to bounce any other ideas off us - just send them ... Regards, Ben |