Thread (2 messages) 2 messages, 2 authors, 2016-08-31

Re: [PATCH 05/22] sequencer: allow the sequencer to take custody of malloc()ed data

flat view

From: Junio C Hamano <hidden>
Date: 2016-08-30 18:26:02

Jakub Narębski [off-list ref] writes:
In my personal opinion 'set_me_free_after_use' is not the best name,
but I unfortunately do not have a better proposal.  Maybe 'entrust_ptr',
or 'entrusted_data' / 'entrusted_ptr' / 'entrusted'?
Is this to accumulate to-be-freed pointers?

I think we often call a local variable that points at a piece of
memory to be freed "to_free", and that is an appropriate name for
what this function is trying to do.

It is a bit surprising that the careless memory management in this
codepath leaks only the dumb pieces of memory (as opposed to
pointers to structures like string list that needs _clear()
functions, in which case we cannot get away with list of
to-be-freed).  I guess we were somewhat lucky ;-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help