Clear reference to application on teardown