=begin pod

=TITLE role Metamodel::Finalization

=SUBTITLE Metaobject supporting object finalization

X<DESTROY>

    role Metamodel::Finalization { ... }

This role takes care that C<DESTROY> submethods are called (if they exist)
when an object is garbage-collected.

=head1 Methods

=head2 method setup_finalization

    method setup_finalization(Metamodel::Finalization:D: $obj)

Collects the C<DESTROY> submethods from this class and all its superclasses,
and marks the class as needing action on garbage collection.

A metamodel for a kind that implements finalization semantics must call this method
at type composition time.

=head2 method destroyers

    method destroyers(Metamodel::Finalization:D: $obj) returns List:D

Returns a list of all finalization methods.

=end pod
