diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-09-28 11:54:17 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:59:26 -0500 |
commit | 8ae2cd82caaf8762e73499a1744c63c42a5b9fe6 (patch) | |
tree | a3aedd4910cb254e9e6aa16b5a058cc3b0563a6c /talloc_guide.txt | |
parent | 0a93af206c723be75de55db5d4da2e8d31a17c54 (diff) | |
download | samba-8ae2cd82caaf8762e73499a1744c63c42a5b9fe6.tar.gz samba-8ae2cd82caaf8762e73499a1744c63c42a5b9fe6.tar.bz2 samba-8ae2cd82caaf8762e73499a1744c63c42a5b9fe6.zip |
r2718: - added a talloc_unreference() function as requested by metze.
- added documentation for talloc_unreference()
- made the abandoned child logic in talloc_free() clearer and more consistent
(This used to be commit a87584c8e3fb06cd3ff29a918f681b5c6c32b9ff)
Diffstat (limited to 'talloc_guide.txt')
-rw-r--r-- | talloc_guide.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/talloc_guide.txt b/talloc_guide.txt index ed3f7713aa..6920ea16f1 100644 --- a/talloc_guide.txt +++ b/talloc_guide.txt @@ -125,6 +125,17 @@ ways: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +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 *)); The function talloc_set_destructor() sets the "destructor" for the |