Allows to store arbitrary data associated to the provided context, which can later retrieved using a particular key.
It is also possible to configure a destroy handler for the key and the value stored, ensuring the memory used will be deallocated once the context is terminated (vortex_ctx_free) or the value is replaced by a new one.
- Parameters:
-
| ctx | The ctx where the data will be stored. |
| key | The key to index the value stored. The key must be a string. |
| value | The value to be stored. If the value to be stored is NULL, the function calls to remove previous content stored on the same key. |
| key_destroy | Optional key destroy function (use NULL to set no destroy function). |
| value_destroy | Optional value destroy function (use NULL to set no destroy function). |