[QUICK] talloc bugs

simo idra at samba.org
Mon Jun 29 05:26:15 MDT 2009

On Mon, 2009-06-29 at 09:37 +0100, Sam Liddicott wrote:
> You have good points here. If we follow this model then I hope that in
> samba, the single parent objects would be phased out. I would hope
> that
> all programs would only use the multi-reference objects, because
> sooner
> or later an additional reference will need to be kept.

I'd honestly really like to see in what kind of code need this extensive
use of references. I use talloc in multiple projects now and I haven't
found a single place where a reference is really needed. The only case
where someone proposed a reference turned out to be a place where the
code was bad enough we decided to change how it worked anyway.

Personally I am for deprecating talloc_reference() and keep the pure
tree approach. And use talloc destructors to deal with the few cases
where something like a reference would be useful.


Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Principal Software Engineer at Red Hat, Inc. <simo at redhat.com>

More information about the samba-technical mailing list