talloc_stack.c?
Tim Potter
tpot at samba.org
Mon Jul 9 02:00:54 GMT 2007
On Mon, 2007-07-02 at 12:14 -0700, Jeremy Allison wrote:
> I've now had a chance to read through Volkers' code and
> I must admit I like the idea - it does provide a standard
> way to attach a hierarchy of talloc contexts to a function
> without having to code everything up as a linked list.
>
> If we ensuer all exits from the function delete that
> talloc stack entry then we're guarenteed to free everything
> up before having to go back to the main loop.
How do we ensure that? Any idiom that requires the programmer to
remember to do something is a bit broken as it's guaranteed that someone
will forget and introduce a memory leak.
(Do I get a vote? I committed something to the source tree just now -
first commit since February, first non svn:ignore property update commit
since June 2006).
Tim.
More information about the samba-technical
mailing list