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