MLReleaseReal32Array (C 函数)

MLReleaseReal32Array 已经被 WSReleaseReal32Array 所取代.

void MLReleaseReal32Array(MLINK link,float *a,int *dims,char **heads,int d)

释放由 MLGetReal32Array() 分配的存储维数为 dims 和标头为 heads 的数组 a 的内存.

更多信息

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

范例

基本范例  (1)

#include "mathlink.h"

/* read an array of single-precision floating-point numbers from a link and then release the memory to MathLink for deallocation */

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

    if(! MLGetReal32Array(lp, &data, &dimensions, &heads))
        { /* Unable to get the array from lp */ }

    /* ... */

    MLReleaseReal32Array(lp, data, dimensions, heads, depth);
}