r2718: - added a talloc_unreference() function as requested by metze.
[samba.git] / talloc_guide.txt
index ed3f7713aa7c64790d058face042160c0d965539..6920ea16f1acf16ab24995d65815affbf01b22f5 100644 (file)
@@ -124,6 +124,17 @@ ways:
     where it is.
 
 
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+void *talloc_unreference(const void *context, const void *ptr);
+
+The talloc_unreference() function removes a reference added by
+talloc_reference(). It must be called with exactly the same arguments
+as talloc_reference().
+
+Note that if the reference has already been removed using
+talloc_free() then this function will fail and will return NULL.
+
+
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 void talloc_set_destructor(const void *ptr, int (*destructor)(void *));