WSReleaseInteger8Array()

void WSReleaseInteger8Array( WSLINK l , unsigned char * a , int * d , char ** h , int depth )

releases memory allocated by WSGetInteger8Array() to store the array a, its dimensions d, and the heads h.

Details

  • The array a must have been allocated by a call to WSGetInteger8Array().
  • WSReleaseInteger8Array() is declared in the WSTP header file wstp.h.

Examples

Basic Examples  (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);
}

See Also

WSGetInteger8Array()  WSReleaseInteger16Array()  WSReleaseInteger32Array()  WSReleaseInteger64Array()

Tutorials