absl::Cleanup::Cleanup

Constructors

Synopses

Declared in <absl/cleanup/cleanup.h>

Move-construct a Cleanup, transferring ownership of the callback.

Cleanup(Cleanup&& other) = default;
» more...

Construct a Cleanup that runs the given callback on scope exit.

Cleanup(Callback callback);
» more...

Parameters

NameDescription
otherThe guard to move from.
callbackThe callable to invoke when the guard is destroyed.