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

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);    
}