From: Kevin M. Rosenberg Date: Wed, 1 Sep 2004 15:35:58 +0000 (+0000) Subject: r9950: add note about malloc/free X-Git-Tag: v1.6.1~88 X-Git-Url: http://git.kpe.io/?p=uffi.git;a=commitdiff_plain;h=2edbb8ace64a4303296fb5582a762070db3cbabd r9950: add note about malloc/free --- diff --git a/doc/ref_string.xml b/doc/ref_string.xml index 7b0e93c..235950a 100644 --- a/doc/ref_string.xml +++ b/doc/ref_string.xml @@ -52,7 +52,9 @@ (result-code (c-gethostname name 256)) (hostname (when (zerop result-code) (uffi:convert-from-foreign-string name)))) - (uffi:free-foreign-object name) + ;; UFFI does not yet provide a universal way to free + ;; memory allocated by C's malloc. At this point, a program + ;; needs to call C's free function to free such memory. (unless (zerop result-code) (error "gethostname() failed."))))