WSReleaseUTF32LinkName (C Function)
void WSReleaseUTF32LinkName(WSLINK l, const unsigned int *n, int v)
releases memory allocated by WSUTF32LinkName() to store the UTF-32 encoded link name n, an array of length v.
Details
- The memory allocated to store the link name n must have been allocated by a call to WSUTF32LinkName().
- WSReleaseUTF32LinkName() is declared in the WSTP header file wstp.h.
Examples
Basic Examples (1)
#include "wstp.h"
/* A function for reading a name for a link */
void f(WSLINK l)
{
const unsigned int *name;
int length;
name = WSUTF32LinkName(l, &length);
/* We check for length <= 1 here because WSUTF32LinkName
returns a string with a byte order mark */
if(name == (const unsigned int *)0 || length <= 1)
{ /* Unable to get the name of the link */ }
/* ... */
WSReleaseUTF32LinkName(l, name, length);
}