WSReleaseByteSymbol (C Function)

void WSReleaseByteSymbol(WSLINK link,const unsigned char *s,int len)

disowns memory allocated by WSGetByteSymbol() to store the character string s corresponding to the name of a symbol.

Details

  • WSReleaseByteSymbol() 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)
{
    unsigned char *sym;
    int len;

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

    /* ... */

    WSReleaseByteSymbol(lp, sym, len);
}