From: Ralph Mason Date: 2002-05-15T17:14:18+09:00 Subject: Re: more embedding fun If I'm not mistaken you can just call rb_gc_register_address To register a pointer to the object handle. When your done rb_gc_unregister_address Ralph ----- Original Message ----- From: "Jeff Ward" Newsgroups: comp.lang.ruby To: "ruby-talk ML" Sent: Wednesday, May 15, 2002 3:44 PM Subject: more embedding fun > (sorry if this is a repost, I don't think it is though) > > I'm still playing with embedding ruby and I've run into a problem. I > have ruby variables I've created that I need to keep in exsistance, > even though they don't have any names associated with them in ruby. > Is there any way to tell the garbage collector to keep something > resident, and then tell it later that it's okay to get rid of? I'd > like to keep the garbage collector around. It's very useful. > However, I need to tell it to explicitly ignore certain objects until > it's told to get rid of them. > > btw, this is actually causing problems because one of the classes has > a pointer to it's c object equivelent in it. The garbage collector > reads that as damaged, and exits on a bug (which causes a bad > shutdown).