512. Ending Phase

512.1. The ending phase consists of two steps: end and cleanup.