|Maintainer||tomac `at` pacific `dot` net `dot` au|
Resource management in the IOR monad.
wraps a resource of type
Resource r a
a so it can be managed
r and automatically released upon exit from
will create a new
manage a f
Resource wrapper around the
value of type
a in region
r, given a finalizer
Each finalizer is guaranteed to automatically be called upon exit from
Finalizers are called in the last in, first out fashion. So the finalizer
of the very last resource allocated will be the first to get called.
Note that finalizers must not throw any errors. Failing to ensure that all errors in a finalizer are handled may result in a resource leak.