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

MLReleaseByteString()

void MLReleaseByteString(MLINK link, const unsigned char *s, int n)
disowns memory allocated by MLGetByteString() to store the array of character codes s.
  • MLReleaseByteString() is declared in the MathLink header file mathlink.h.
#include "mathlink.h"

/* read a string composed of character code values 0-255 from the link and release that memory to MathLink for deallocation */

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

    if(! MLGetByteString(lp, &string, &length, 0))
        { /* unable to read byte string from lp */ }

    /* ... */

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