H5atclose

fnherr_t H5atclose(H5_atclose_func_t func, void * ctx)

Registers a callback for the library to invoke when it's closing.

H5atclose() registers a callback that the HDF5 library will invoke when closing. The full capabilities of the HDF5 library are available to callbacks invoked through this mechanism, and library shutdown will only begin in earnest when all callbacks have been invoked and have returned.

Registered callbacks are invoked in LIFO order (last registered, first invoked). Registering the same callback multiple times will result in multiple invocations of the callback.

If the HDF5 library is initialized and closed more than once, the callback must be registered within each open/close cycle.

Parameters

funcThe function pointer to invoke
ctxContext to pass to func when invoked

Returns

Returns a non-negative value if successful;

otherwise returns a negative value.

Since: HDF5 1.14.0