From: Raj Sahae Date: 2007-03-27T20:39:36+09:00 Subject: Re: drb recycled object problem ara.t.howard@noaa.gov wrote: > yeah. terrible idea. > > you just need to keep a reference to it to prevent it from being > gc'd. can > you show use some code? > > -a Snipping code would be tricky. It's a fairly large program. None of the objects that are important are ever, EVER, not referenced somehow. Everything is stored in arrays, and transferred around in arrays. Objects on the server are moved from array to array by the client calling methods using DRb. What kind of code would you want me to show you to prove this? # on the server DRb.start_service($uri, server.game) # on the client DRb.start_service game = DRbObject.new(nil, "druby://#{ipfield.text}:#{$port}") # File.open($deck_dir + filefield.text.strip, "r"){|file| game.add_player(namefield.text, file.gets)} then the client operates by making repeated method calls on "game"