An an App exit hook for application-specific teardown