>>>>> "p" == pseudoman4  <pseudoman4 / yahoo.com> writes:

p> void BindToRubyVariable(someObject* native, char* variableName) {
p>   VALUE klass = get_ruby_class_object_from_somewhere
p>   VALUE ruby_obj = Data_Wrap_Struct(klass, 0, 0, native);
     ^^^^^^^^^^^^^^
p>   rb_define_variable(variableName, &ruby_obj);
                                      ^^^^^^^^^

 at the end of the function, this address is not valid and probably will
 not make reference to the new created object

p> }


Guy Decoux