WSReleaseLinksFromEnvironment (C Function)
void WSReleaseLinksFromEnvironment( WSENV env , WSLINK * l , int n )
releases memory allocated by WSGetLinksFromEnvironment() to store the links in l, a list of length n.
Details
- The list l must have been acquired from a call to WSGetLinksFromEnvironment().
- WSReleaseLinksFromEnvironment() is declared in the WSTP header file wstp.h.
Examples
Basic Examples (1)
#include "wstp.h"
/* A function for retrieving the current links open from an environment */
void f(WSENV env)
{
WSLINK *theList;
int length;
if(! WSGetLinksFromEnvironment(env, &theList, &length))
{ /* Unable to get the list of links */ }
/* ... */
WSReleaseLinksFromEnvironment(env, theList, length);
}