From: Raj Sahae Date: 2007-03-27T12:32:58+09:00 Subject: Re: drb recycled object problem Raj Sahae wrote: > ara.t.howard@noaa.gov wrote: >> On Tue, 27 Mar 2007, Raj Sahae wrote: >> >>> Raj Sahae wrote: >>>> I did a search on google and found the following page. >>>> http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-talk/13236?13221-13721 >>>> Going down on that page, you find a header saying 'drb and >>>> "recycled objects" error'. >>>> I am having a similar error (recycled object, RangeError), but I >>>> don't understand the solution given here, and I was hoping someone >>>> could explain to me what the solution is, and why it works. What >>>> is GCing? >>>> >>>> Raj Sahae >>>> >>>> >>> bump? >> >> you have a handle on an object which has been garbage collected on >> the server. >> if you're going to be serving objects you need to be sure a reference >> to them >> is maintained on the server. >> >> -a > Ahh, that's what recycled object means then. So how do I prevent the > object from being recycled until the server program is exited. Also, > why is the server recycling an object that is still in use? > > Raj > > Sorry for the double post. I should have done a little reading on the GC module before asking that last question. Let me rephrase and instead ask, is it wise to disable garbage collection at the beginning of a program, then enable it when the program quits out? Seems to me that's asking for trouble unless you really know what you are doing.