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

void WSReleaseDomainNameList(WSENV e, char **l, int n)
frees the memory allocated by WSGetDomainNameList() stored in list l of length n.

DetailsDetails

  • WSReleaseDomainNameList() is declared in the WSTP header file wstp.h.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "wstp.h"

/* A function that reads the domain names available on a machine */

void f(WSENV e)
{
    char **theList = NULL;
    char *tmp;
    unsigned long length;

    theList = WSGetDomainNameList(env, &length);

    if(length > 0 && theList != (char **)0)
    {
        while((tmp = *theList++) != (char *)0)
        {
            /* ... */
        }

        WSReleaseDomainNameList(env, theList, length);
    }
}