WSReleaseUTF8LinkName (C Function)

void WSReleaseUTF8LinkName(WSLINK l, const unsigned char *n, int v)

releases memory allocated by WSUTF8LinkName() to store the UTF-8 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 WSUTF8LinkName().
  • WSReleaseUTF8LinkName() is declared in the WSTP header file wstp.h.

Examples

Basic Examples  (1)

#include "wstp.h"

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

void f(WSLINK l)
{
    const unsigned char *name;
    int length;

    name = WSUTF8LinkName(l, &length);
    if(name == (const unsigned char *)0 || length == 0)
    { /* Unable to get the name of the link */ }

    /* ... */

    WSReleaseUTF8LinkName(l, name, length);
}