r2719: an additional note on talloc_unreference()
authorAndrew Tridgell <tridge@samba.org>
Tue, 28 Sep 2004 11:57:40 +0000 (11:57 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:59:26 +0000 (12:59 -0500)
talloc_guide.txt

index 6920ea16f1acf16ab24995d65815affbf01b22f5..ae75f73d8eccfebc50aeee0f8f312b63157529a6 100644 (file)
@@ -134,6 +134,11 @@ as talloc_reference().
 Note that if the reference has already been removed using
 talloc_free() then this function will fail and will return NULL.
 
+Usually you can just use talloc_free() instead of
+talloc_unreference(), but sometimes it is useful to have the
+additional control on who becomes the parent of the pointer given by
+talloc_unreference().
+
 
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 void talloc_set_destructor(const void *ptr, int (*destructor)(void *));