Subject: Re: [RFC PATCH 3/6] contrib/cgit-rs: introduce Rust wrapper for libgit.a

From: Junio C Hamano <[email-masked]>
Date: Wed, 07 Aug 2024 19:21:04 -0700

"brian m. carlson" <[email-masked]> 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?