the sorry saga of the talloc soname 'fix'
obnox at samba.org
Wed Jul 8 09:17:31 GMT 2009
Sam Liddicott wrote:
> * Michael Adam wrote, On 08/07/09 09:42:
> > The remedy for all our problems is to just get rid of
> > talloc_reference/talloc_unreference, the source of all
> > evil and grief.
> > Frankly, I personally can't imagine why one would use them at all...
> Excellent a joke!
> (for the humour impaired, talloc_reference was added for a reason. I
> make heavy use of it, hence I'm the one providing the fix to unite
> talloc_reference with talloc_free).
In fact, I am not joking. :-)
talloc_(un)reference turns the neat, simple tree of memory
allocations into a graph with cycles and whatnot. This is
the origin of the problems we are currently discussing.
And I really think that this additional complexity is avoidable.
Maybe this is due to the fact that I have up to now mainly worked
on the samba3 codebase where there is virtually no use of
talloc_reference, as opposed to samba4 which makes rather heavy
use of talloc_reference. I myself have never used it and I have
never felt the need to do so.
And given the problems that this creates, I really cannot see
why one would not try to avoid using talloc_reference by all
means (only because of sheer laziness.. ;-).
Sam, please excuse my ignorance, can you give me an example of a
situation that you could not have solved without talloc_reference?
Cheers - Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 206 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20090708/d6d42a90/attachment.bin
More information about the samba-technical