Re: (inout) (transfer full) annotations for container types



On Thu, Feb 19, 2015 at 2:32 AM, Philip Withnall <philip tecnocode co uk> wrote:
If there is no convention, I suggest it makes more sense to have the
caller only ever call g_array_unref(), g_ptr_array_unref(),
g_hash_table_unref(), and never explicitly free the elements. For
(transfer full), the callee should be responsible for setting the
clear/free function for elements. For (transfer container), the callee
should be responsible for *not* setting such a function (or for adding
the elements to a newly allocated container with no free function set,
or similar).

For what it's worth, this interpretation makes a lot of sense to me.

-Simon


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]