|
SOLUTIONS
|
MATHEMATICA MATHLINK C FUNCTION
MLReleaseString()
void MLReleaseString(MLINK link, const char *s)
disowns memory allocated by MLGetString() to store the character string s.
DetailsDetails
- MLReleaseString() is declared in the MathLink header file mathlink.h.
ExamplesExamplesopen allclose all
Basic Examples (1)Basic Examples (1)
#include "mathlink.h"
/* read a C string from a link and then release that memory to MathLink for deallocation */
void f(MLINK lp)
{
const char *s;
if(! MLGetString(lp, &s))
{ /* unable to read the string from lp */ }
/* ... */
MLReleaseString(lp, s);
}
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
