From: Andreas Schneider Date: Mon, 7 May 2012 09:30:06 +0000 (+0200) Subject: doc: Fixes for the talloc destructor tutorial. X-Git-Tag: samba-4.0.0alpha21~307 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=79efc9d6e2c57c6acd8216be4b3387180032addd;p=thirdparty%2Fsamba.git doc: Fixes for the talloc destructor tutorial. --- diff --git a/lib/talloc/doc/tutorial_destructors.dox b/lib/talloc/doc/tutorial_destructors.dox index 178f4cc4a85..ed063876a30 100644 --- a/lib/talloc/doc/tutorial_destructors.dox +++ b/lib/talloc/doc/tutorial_destructors.dox @@ -1,5 +1,6 @@ /** @page libtalloc_destructors Chapter 4: Using destructors + @section destructors Using destructors Destructors are well known methods in the world of object oriented programming. @@ -10,7 +11,7 @@ deallocating memory). With talloc we can take the advantage of destructors even in C. We can easily attach our own destructor to a talloc context. When the context is freed, the -destructor is run automatically. +destructor will run automatically. To attach/detach a destructor to a talloc context use: talloc_set_destructor(). @@ -34,8 +35,8 @@ int list_remove(void *ctx) } @endcode -GCC3+ can check for the types during the compilation. So if it is -our major compiler, we can use a little bit nicer destructor: +GCC version 3 and newer can check for the types during the compilation. So if +it is our major compiler, we can use a more advanced destructor: @code int list_remove(struct list_el *el) @@ -78,4 +79,4 @@ struct list_el* list_insert_free(TALLOC_CTX *mem_ctx, } @endcode -*/ \ No newline at end of file +*/