MLReleaseByteString()

void MLReleaseByteString(MLINK link, const unsigned char *s, int n)
文字コードs の配列を保持するために,MLGetByteString()で割り当てられたメモリを解放する.

詳細詳細

  • 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 »