Mathematica > Systems Interfaces & Deployment > C/C++ Language Interface > MathLink C Language Functions >
Mathematica > Systems Interfaces & Deployment > MathLink API > MathLink C Language Functions >
MathLink C Function

MLReleaseUCS2String()

void MLReleaseUCS2String(MLINK link, unsigned short *s, int n)
disowns memory allocated by MLGetUCS2String() to store the string s.
  • MLReleaseUCS2String() is declared in the MathLink header file mathlink.h.
#include "mathlink.h"

/* read a UCS-2 encoding string from a link and then release the memory to MathLink for deallocation */

void f(MLINK lp)
{
    unsigned short *string;
    int length;

    if(! MLGetUCS2String(lp, &string, &length))
        { /* unable to read the UCS-2 string */ }

    /* ... */

    MLReleaseUCS2String(lp, string, length);
}
© 2008 Wolfram Research, Inc.
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team