>>>>> "B" == Baptiste Lepilleur <gaiacrtn / free.fr> writes:

B> What I'm looking for is a way to register a 'mark' callback similar to the
B> one passed to Data_Wrap_Structure, an unregister it at a later time. That
B> way, I would be able to register the callback when MyObject is instantiated,
B> and unregister the same callback when the instance of MyObject is destroyed.

 Rather than register a callback, you can  just create an object (with
 Data_Wrap_struct) and store it in a Hash or Array (declared with
 rb_global_variable()).

 When the instance of MyObject is destroyed, you just remove this object
 from the hash (or the array).


Guy Decoux