role Metamodel::Finalization { ... }
This role takes care that DESTROY
submethods are called (if they exist) when an object is garbage-collected.
method setup_finalization(Metamodel::Finalization:D: $obj)
Collects the 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.
method destroyers(Metamodel::Finalization:D: $obj --> List:D)
Returns a list of all finalization methods.