Deterministic allocation and freeing of scarce resources
Description
Allocate resources which are guaranteed to be released.
All register cleanup actions live in the IO monad, not the main monad.
This allows both more efficient code, and for monads to be transformed.