MLReleaseByteArray()

void MLReleaseByteArray(MLINK link, unsigned char *a, int *dims, char **heads, int d)
配列a,その次元dims,そして頭部heads を保持するために,MLGetByteArray() で割り当てられたメモリを解放する.

詳細詳細

  • MLReleaseByteArray()MathLink ヘッダファイルmathlink.hの中で宣言される.

例題例題すべて開くすべて閉じる

例 (1)例 (1)

#include "mathlink.h"

/* read an array of integers each of size 1 byte and then release that memory to MathLink for deallocation */

void f(MLINK lp)
{
    unsigned char *data;
    int *dimensions;
    char **heads;
    int depth;

    if(! MLGetByteArray(lp, &data, &dimensions, &heads, &depth))
        { /* unable to read array from lp */ }

    /* ... */

    MLReleaseByteArray(lp, data, dimensions, heads, depth);
}
New to Mathematica? Find your learning path »
Have a question? Ask support »