WSReleaseInteger8Array()
This feature is not supported on the Wolfram Cloud.

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.

DetailsDetails

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

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "wstp.h"

/* A function for retrieving an array of 8-bit integers from a link */

void f(WSINK 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);
}