WSReleaseInteger64Array (C 函数)

void WSReleaseInteger64Array(WSLINK link,wstpint64 *a,int *dims,char **heads,int d)

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

更多信息

  • WSTP 的标头文件 wstp.h 已对 WSReleaseInteger64Array() 作出声明.

范例

基本范例  (1)

#include "wstp.h"

/* read an array of 64-bit integers from a link and then release the memory to WSTP for deallocation */

void f(WSLINK lp)
{
    wstpint64 *data;
    int *dimensions;
    char **heads;
    int depth;


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

    /* ... */

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