Finalizerとは, あるオブジェクト obj がGCされる時に obj に依存しているオブジェクトに対 してメッセージを送る機能です.
require 'finalize'
Finalizer.add(obj, dependant, method = :finalize, *opt)
Finalizer.add_dependency(obj, dependant, method = :finalize, *opt)
Finalizer.delete(id, dependant, method = :finalize)
Finalizer.delete_dependency(id, dependant, method = :finalize)
Finalizer.delete_all_dependency(id, dependant)
Finalizer.delete_by_dependant(dependant, method = :finalize)
Finalizer.delete_all_by_dependant(dependant)
Finalizer.finalize_dependency(id, dependant, method = :finalize)
Finalizer.finalize_all_dependency(id, dependant)
Finalizer.finalize_by_dependant(dependant, method = :finalize)
Finalizer.finalize_all_by_dependant(dependant)
Finalizer.finalize_all
Finalizer.safe