multi-indexed tdb

tridge at tridge at
Tue Aug 15 03:13:18 GMT 2006


 > Sort of :-). What I tried to convey in the phone call was that
 > I don't like talloc_steal, as I think it's a poor man's auto_ptr
 > and I find it confusing.

The basis of talloc_steal() is "move this memory from one context to
another". That's all it does! It's just a shorthand for a copy/free,
with the additional advantage of not having the possibility of a
failure due to running out of memory, so you don't need to error check

Maybe you're still thinking in terms of the old "put all your memory
in a big bucket associated with a task" model that was used in the old
talloc code? That's the old "memory pool" model, and while you can use
the new talloc in that way, I think its a really bad idea. I think you
really should think of your memory as a tree with the new talloc code,
even if you don't ever call talloc_steal().

 > But the main thing is there is no such thing as a "ban" on anything
 > in Samba code. No one listens to me anyway :-) :-).

umm, no, people do listen to you! 

More seriously, can you please clarify this more directly? Do you
think the fact that code uses talloc_steal() is a valid reason to
reject using the code in Samba3 ?

Cheers, Tridge

More information about the samba-technical mailing list