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

void WSReleaseSymbol(WSLINK link,char *s)
disowns memory allocated by WSGetSymbol() or WSGetFunction() to store the character string s corresponding to the name of a symbol.

DetailsDetails

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

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "wstp.h"

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

void f(WSINK lp)
{
    char *sym;

    if(! WSGetSymbol(lp, &sym))
        { /* unable to read a symbol from lp */ }

    /* ... */

    WSReleaseSymbol(lp, sym);
}