WSReleaseUTF16LinkName()
This feature is not supported on the Wolfram Cloud.

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.

DetailsDetails

  • 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.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "wstp.h"

/* A function for retrieving the name of a link */

void f(WSINK 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);
}
Introduced in 2014
(10.0)