From: Jens Nissen Date: 2001-12-17T20:36:48+09:00 Subject: [ruby-talk:28753] Re: Constant loss of memory with Kernel::load in a loop "Michael Neumann" schrieb im Newsbeitrag news:20011217114944.B399@michael.neumann.all... > > I don't know, but maybe it's the method you declare in loadit.rb? > Does Ruby free overwritten methods? > To make this sure, simply load an empty file in the while-loop and test > again. > You can reduce "loadit.rb" to something like # loadit.rb # endof loadit.rb and the problem remains the same. It has to be something with the actual representation of the loaded program in memory. If there is no such file to load, the problem does not appear: # demo-no.rb tries to load non-existing file "noload.rb" counter = 0 while TRUE begin counter = counter + 1 puts "Round #{counter}" if (counter.modulo(100) == 0) GC.start if (counter.modulo(500) == 0) load "noload.rb" rescue Exception retry end end # end of demo-no.rb Thanks anyhow, Jens