SCOPE_EXIT

Capture code that shall be run when the current scope exits.

Synopsis

Declared in <folly/ScopeGuard.h>

#define SCOPE_EXIT

Description

The code within SCOPE_EXIT's braces shall execute as if the code was in the destructor of an object instantiated at the point of SCOPE_EXIT.

Variables used within SCOPE_EXIT are captured by reference.