Questions about rb_iv_set/get

i do have some questions about rb_iv_set/get in order to know if i must
** OR NOT ** free mem allocation relevant to VALUEs passed to rb_iv_set
?

are only pointers stored ore copies of strings ?

On 8/31/06, Une bévue [email protected] wrote:

i do have some questions about rb_iv_set/get in order to know if i must
** OR NOT ** free mem allocation relevant to VALUEs passed to rb_iv_set
?

are only pointers stored ore copies of strings ?

I’m afraid I can’t help you with your question, but I can help you get
more answers. It’s a simple thing, just don’t post with the broken
[EXTRA TAGS THAT MAKE YOUR SUBJECT HARD TO READ] subject
line.

Une bévue wrote:

i do have some questions about rb_iv_set/get in order to know if i must
** OR NOT ** free mem allocation relevant to VALUEs passed to rb_iv_set
?

are only pointers stored ore copies of strings ?

Assuming you’re using one of the rb_str_new family of functions to
create Ruby String objects from C strings, Ruby makes a copy of the C
string in Ruby-managed memory. In general Ruby objects are always in
Ruby-managed memory unless you’re wrapping one of your own C structures
into a Ruby object with Data_Wrap_Struct.

pat eyler [email protected] wrote:

I can help you get
more answers. It’s a simple thing, just don’t post with the broken
[EXTRA TAGS THAT MAKE YOUR SUBJECT HARD TO READ] subject
line.

what are those exactly ? the “[C ext 2 Ruby]” : for my point of view it
is to advert people this thread speaks about “C ext 2 Ruby”, not all are
interested…

or, is it for the “/” of “rb_iv_set/get” ???

Timothy H. [email protected] wrote:

Assuming you’re using one of the rb_str_new family of functions to
create Ruby String objects from C strings, Ruby makes a copy of the C
string in Ruby-managed memory. In general Ruby objects are always in
Ruby-managed memory unless you’re wrapping one of your own C structures
into a Ruby object with Data_Wrap_Struct.

ok, fine, thanks, for this precise answer !