Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Document type Metamodel::Finalization
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| =begin pod | ||
| X<DESTROY> | ||
| =TITLE role Metamodel::Finalization | ||
| =SUBTITLE Metamodel role for finalization / destroyer method | ||
| 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 |