memobj_wrap_attr_set_destructor()
Set the function to be called when the memory is no longer needed
Synopsis:
#include <memobj/wrap.h>
void memobj_wrap_attr_set_destructor(struct memobj_wrap_attr *attr, memobj_destructor_t *fn, void *arg)
Arguments:
- attr
- The attribute structure to modify.
- fn
-
A pointer to the destructor function, or
NULL. - arg
- A value to be passed to the destructor.
Library:
libmemobjDescription:
The memobj_wrap_attr_set_destructor() funciton sets the function to be called when the memory is no longer needed.
If memobj_share() was used, the destructor runs only when all memobj structs sharing the same data have been destroyed.
Page updated:
