From: Aleksei Guzev Date: 2001-11-16T17:12:18+09:00 Subject: [ruby-talk:25395] RE: Ruby API question This is a multi-part message in MIME format. ------=_NextPart_000_0038_01C16EA0.2DBB0AE0 Content-Type: multipart/alternative; boundary="----=_NextPart_001_0039_01C16EA0.2DBB0AE0" ------=_NextPart_001_0039_01C16EA0.2DBB0AE0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Use "rb_newobj" function. (see "ruby.h" for details ;) ) -----Original Message----- From: Ralph Mason [mailto:ralph.mason@telogis.com] Sent: 16 ?????? 2001 ?. 12:53 To: ruby-talk ML Subject: [ruby-talk:25394] Ruby API question I am creating ruby objects from C++ and need to know how to tell the ruby garbage collector that I don't want them collected. rb_global_variable variable would look to be what I need however there doesn't seem to be a function to tell the garbage collector that I have finished with the object and it can collect it. Also I am creating the objects using myobject = rb_eval_string("Myclass.new()") , is this right way to do this or is there some cleaner way? Thanks ------=_NextPart_001_0039_01C16EA0.2DBB0AE0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message
Use "rb_newobj" function.
 
(see "ruby.h" for details ;) )
-----Original Message-----
From: = Ralph Mason=20 [mailto:ralph.mason@telogis.com]
Sent: 16 = ноября 2001 г.=20 12:53
To: ruby-talk ML
Subject: [ruby-talk:25394] = Ruby API=20 question

I am creating ruby objects from C++ = and need to=20 know how to tell the ruby garbage collector that I don't want them=20 collected.  rb_global_variable = variable=20 would look to be what I need however there doesn't seem to be a = function to=20 tell the garbage collector that I have finished with the object and it = can=20 collect it.
 
Also I am creating the objects=20 using   myobject =3D = rb_eval_string("Myclass.new()") , is=20 this right way to do this or is there some cleaner way?
 
Thanks
 

------=_NextPart_001_0039_01C16EA0.2DBB0AE0-- ------=_NextPart_000_0038_01C16EA0.2DBB0AE0 Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUr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