[RFC] Making talloc_reference() safer.

Jeremy Allison jra at samba.org
Mon Oct 24 17:46:27 MDT 2011


On Mon, Oct 24, 2011 at 05:50:38PM +1100, ronnie sahlberg wrote:
> 
> Even better I think would be if you had a new set of creator functions
>  where you could set the "no longer hierarical, now its multi-parent
> referenced" already from the initial creation. That would be even
> better imho  to force the choice of api at object creation time and
> not create it as ahierarical object and then later "upgrade" it to a
> different model.
> 
> 
> I.e. offer something like this
> talloc_new_ref(...)
> instead of using the pattern
> talloc_new(...)
> ...
> talloc_make_reference_ptr(...)

Yes, this makes much more sense to me too.

Jeremy.


More information about the samba-technical mailing list