MLReleaseByteSymbol()

void MLReleaseByteSymbol(MLINK link, const unsigned char *s, int len)
disowns memory allocated by MLGetByteSymbol() to store the character string s corresponding to the name of a symbol.

DetailsDetails

  • MLReleaseByteSymbol() is declared in the MathLink header file mathlink.h.

ExamplesExamplesopen allclose all

Basic Examples (1)Basic Examples (1)

#include "mathlink.h"

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

void f(MLINK lp)
{
    unsigned char *sym;
    int len;

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

    /* ... */

    MLReleaseByteSymbol(lp, sym, len);
}
New to Mathematica? Find your learning path »
Have a question? Ask support »