 This requires only a single return at the end of the code, and can result in heavily nested code if many resources must be acquired, which is considered an anti-pattern by some – the "Arrow Anti Pattern," due to the triangular shape from the successive nesting.One other approach, which allows early return but consolidates cleanup in one place, is to have a single exit return of a function, preceded by cleanup code, and to use goto to jump to the cleanup before exit.This is infrequently seen in modern code, but occurs in some uses of C.