MLReleaseByteString()

void MLReleaseByteString(MLINK link, const unsigned char *s, int n)
释放由 MLGetByteString() 分配的存储字符代码为 s 的数组的内存.

更多信息更多信息

  • MLReleaseByteString()MathLink 标头文件 mathlink.h 中被声明.

范例范例打开所有单元关闭所有单元

基本范例 (1)基本范例 (1)

#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);
}
New to Mathematica? Find your learning path »
Have a question? Ask support »