From: Emden R. Gansner Date: Mon, 8 Jul 2013 15:36:06 +0000 (-0400) Subject: Add function to free memory allocated by gvRenderData, as the applications run-time X-Git-Tag: LAST_LIBGRAPH~32^2~158^2~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=56c26fa6600f0d4cd163851c8910de9d380e3cb1;p=graphviz Add function to free memory allocated by gvRenderData, as the applications run-time --- diff --git a/doc/libguide/basic.tex b/doc/libguide/basic.tex index 1246bfa1a..e340a7c51 100644 --- a/doc/libguide/basic.tex +++ b/doc/libguide/basic.tex @@ -693,8 +693,14 @@ Of note is unsigned int *length) \end{verbatim} which writes the output of the rendering onto an allocated character buffer. A pointer -to this buffer is returned in {\tt result} and the number of bytes written is stored in +to this buffer is returned in {\tt *result} and the number of bytes written is stored in {\tt length}. After using the buffer, the memory should be freed by the application. +As the calling program may rely on a different run-time system than that used by +\gviz, the library provides the function +\begin{verbatim} + gvFreeRenderData (char *data); +\end{verbatim} +which can be used to free the memory pointed to by {\tt *result}. Sometimes, an application will decide to do its own rendering. An application-supplied