WSReleaseSymbol()

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.

Details

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

Examples

Basic Examples  (1)

#include "wstp.h"

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

void f(WSLINK lp)
{
    char *sym;

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

    /* ... */

    WSReleaseSymbol(lp, sym);
}

See Also

WSGetString()  WSGetFunction()

Tutorials