WSReleaseInteger8Array (C 函数)
void WSReleaseInteger8Array( WSLINK l , unsigned char * a , int * d , char ** h , int depth )
释放由 WSGetInteger8Array() 分配的内存,以储存数组 a、其维数 d 及其标头 h.
更多信息
- 数组 a 肯定在调用 WSGetInteger8Array() 时就已被分配.
- WSTP 的标头文件 wstp.h 已对 WSReleaseInteger8Array() 作出声明.
范例
基本范例 (1)
#include "wstp.h"
/* A function for retrieving an array of 8-bit integers from a link */
void f(WSLINK l)
{
unsigned char *data;
int *dims;
char **heads;
int depth;
if(! WSGetInteger8Array(l, &data, &dims, &heads, &depth))
{ /* Unable to get the array of integers from the link */ }
/* ... */
WSReleaseInteger8Array(l, data, dims, heads, depth);
}
相关指南
历史
2014年引入 (10.0)