Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > MathLink C Language Functions >
MathLink C Function

MLReleaseSymbol()

void MLReleaseSymbol(MLINK link, char *s)
disowns memory allocated by MLGetSymbol() or MLGetFunction() to store the character string s corresponding to the name of a symbol.
  • MLReleaseSymbol() is declared in the MathLink header file mathlink.h.
#include "mathlink.h"

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

void f(MLINK lp)
{
    char *sym;

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

    /* ... */

    MLReleaseSymbol(lp, sym);
}
© 2013 Wolfram Research, Inc. Japanese
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team