I have several structs bound with Data_Wrap_Struct to ruby objects and I also supplied mark() and free() functions.
When I manually start the GC or just wait until it jumps in my ruby objects are killed. Nothing new so far.
The strange thing is: When I try to protect these objects with rb_gc_register_address() nothing happens - my objects will still be killed.
I can only prevent the GC from doing that with something like this:
objects = rb_ary_new();
rb_gc_register_address(&objects);
rb_ary_push(objects, data);
Is that the only way and why can't I just use rb_gc_register_address()?