Well, I thought I already tried and that it worked fine... But I think I found the problem ... define_finalizer does not take any block ! (so, it is normal that it is not called ;-)) You have to write either the thing Ilmari suggested or remove the '&' before the method (it works, I just tried it) -- Sylvain