(file_list.c) Document file_list_free() behavior

This commit is contained in:
Higor Eurípedes 2017-09-03 10:30:01 -03:00
parent 718eeb4a39
commit 9a50f5f8b1
1 changed files with 10 additions and 0 deletions

View File

@ -59,6 +59,16 @@ void *file_list_get_userdata_at_offset(const file_list_t *list,
void *file_list_get_actiondata_at_offset(const file_list_t *list,
size_t index);
/**
* @brief frees the list
*
* NOTE: This function will also free() the entries actiondata
* and userdata fields if they are non-null. If you store complex
* or non-contiguous data there, make sure you free it's fields
* before calling this function or you might get a memory leak.
*
* @param list
*/
void file_list_free(file_list_t *list);
bool file_list_append(file_list_t *userdata, const char *path,