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

void WSReleaseUCS2Symbol(WSLINK link,unsigned short *s,int len)
disowns memory allocated by WSGetUCS2Symbol() to store the UCS-2 Unicode string s with length len corresponding to the name of a symbol.

DetailsDetails

  • WSReleaseUCS2Symbol() is declared in the WSTP header file wstp.h.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "wstp.h"

/* read a UCS-2 encoded symbol from a link and then release the memory to WSTP for deallocation */

void f(WSINK lp)
{
    unsigned short *symbol;
    int length;

    if(! WSGetUCS2Symbol(lp, &symbol, &length))
        { /* unable to read the UCS-2 symbol */ }

    /* ... */

    WSReleaseUCS2Symbol(lp, symbol, length);
}