docs/src/modules.md

changeset 326
3dd7d21fb76b
parent 325
a3e63cb21e20
child 340
8acf182f6424
equal deleted inserted replaced
325:a3e63cb21e20 326:3dd7d21fb76b
453 ucx_mempool_set_destr(obj, (ucx_destructor) my_object_destroy); 453 ucx_mempool_set_destr(obj, (ucx_destructor) my_object_destroy);
454 ``` 454 ```
455 Be aware, that your destructor function should not free any memory, that is 455 Be aware, that your destructor function should not free any memory, that is
456 also managed by the pool. 456 also managed by the pool.
457 Otherwise you might be risking a double-free. 457 Otherwise you might be risking a double-free.
458 More precisely, a destructor function set with `ucx_mempool_set_destr()` MUST
459 NOT call `free()` on the specified pointer whereas a desructor function
460 registered with `ucx_mempool_reg_destr()` MAY (and in most cases will) call
461 `free()`.
458 462
459 ## Properties 463 ## Properties
460 464
461 *Header file:* [properties.h](api/properties_8h.html) 465 *Header file:* [properties.h](api/properties_8h.html)
462 *Required modules:* [Map](#map) 466 *Required modules:* [Map](#map)

mercurial