Navigation

Operators and Keywords

Function List:

C++ API

: obj = onCleanup (function)

Create a special object that executes a given function upon destruction.

If the object is copied to multiple variables (or cell or struct array elements) or returned from a function, function will be executed after clearing the last copy of the object. Note that if multiple local onCleanup variables are created, the order in which they are called is unspecified. For similar functionality See ‘The unwind_protect Statement’.

Package: octave