From c06728ff0aa9025aa5f68d664d5fa628ea41d0b0 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 18 Nov 2014 14:09:49 +0100 Subject: [PATCH] doc: explain use of memory management annotation on strings Signed-off-by: Sven Verdoolaege --- doc/user.pod | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/user.pod b/doc/user.pod index d4e37cd6..d988c075 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -381,6 +381,8 @@ C<__isl_keep> arguments as the user likes. There is one exception, and that is the case where the pointer returned is C. Is this case, the user is free to use it as an C<__isl_take> argument or not. +When applied to a C, the returned pointer needs to be +freed using C. =item C<__isl_null> @@ -406,6 +408,10 @@ temporarily. After the function has finished, the user can still use it as an argument to other functions. A C value will be treated in the same way as a C value for an C<__isl_take> argument. +This annotation may also be used on return values of +type C, in which case the returned pointer should +not be freed by the user and is only valid until the object +from which it was derived is updated or freed. =back -- 2.11.4.GIT