From: Timothy Hunter Date: 2006-09-01T06:55:48+09:00 Subject: Re: [C ext 2 Ruby] questions about rb_iv_set/get 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.