From: "Iñaki Baz Castillo" Date: 2012-05-18T04:36:36+09:00 Subject: Re: rb_gc_register_address() or rb_gc_mark()? 2012/5/17 Hans Mackowiak : > i create an hash from the C-side, mark them with rb_global_variable and > then store my objects into them ... > > this protects my objects from being deleted. Hi, that's strange since rb_global_variable() is: void rb_global_variable(VALUE *var) { rb_gc_register_address(var); } I can sure that rb_gc_register_address(&value) does not keep value from being GC'd if value comes out of the scope. So, maybe rb_gc_register_address() (which is the very same as rb_global_variable()) is just useful when the VALUE is directly created from C land? -- Iñaki Baz Castillo