"brian m. carlson" <sandals@xxxxxxxxxxxxxxxxxxxx> writes: > I think if we're going to be writing a general purpose API for > libification, we probably should provide free functions. Normally, that > will be a call to free(3), but in some cases we may need more complex > logic, and by providing those, we're making the API more consistent and > easy to use. Do you mean that we should have variants of free() that are specific to each data structure? E.g., Patrick taught fetch_task_release() to release the task structure itself, in addition to the resources it holds, while renaming fetch_task_release() to fetch_task_free(), with ff25992c (submodule: fix leaking fetch tasks, 2024-08-07), so if cgit-sys wants to expose fetch_task object to the outside world, the consumers would call fetch_task_free() on it?