summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-09-28 11:57:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:26 -0500
commit4ff5ffa4a02c21b40e60655c952c10f842d9e942 (patch)
treeba5df61b589aae674441de0adad8377c4ed8d9b3
parent8ae2cd82caaf8762e73499a1744c63c42a5b9fe6 (diff)
downloadsamba-4ff5ffa4a02c21b40e60655c952c10f842d9e942.tar.gz
samba-4ff5ffa4a02c21b40e60655c952c10f842d9e942.tar.bz2
samba-4ff5ffa4a02c21b40e60655c952c10f842d9e942.zip
r2719: an additional note on talloc_unreference()
(This used to be commit 078d13181313f98c1df50185ebae4629cca98ee0)
-rw-r--r--talloc_guide.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/talloc_guide.txt b/talloc_guide.txt
index 6920ea16f1..ae75f73d8e 100644
--- a/talloc_guide.txt
+++ b/talloc_guide.txt
@@ -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 *));