From: Robert Feldt Date: 2001-02-08T19:28:03+09:00 Subject: [ruby-talk:10558] Re: Garbage collector (Was: Embedded Ruby (Part III)) On Thu, 8 Feb 2001, Robert Feldt wrote: > On Thu, 8 Feb 2001, Olivier CARRERE wrote: > > > > > >I hope so too, since I'm far from being a great Ruby guru. BTW, do you > > > > >know how to explicitely call the garbage collector? > > > > > > > > From the standard PR book, GC.start should do it. > > > > > > Mmh, that means calling it from Ruby itself, but how to call it from an > > > external C prog? > > > > I finally found something called gc_sweep() into gc.c, I hope that's it. > > > No, don't use it; it's only one part of the Mark-and-SWEEP algorithm. > > But I haven't followed this thread so I might be out of line... > Oh, BTW gc_start is the one but note that it is not exported in ruby.h. One way might be rb_eval_string("GC.start") but there are probably better ways... /R