WSReleaseNetworkAddressList()

void WSReleaseNetworkAddressList(WSENV env,char **l,int n)

frees the memory allocated by WSGetNetworkAddressList() stored in list l of length n.

Details

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

Examples

Basic Examples  (1)

#include "wstp.h"

/* A function that reads the IP addresses available on a machine */

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

    theList = WSGetNetworkAddressList(env, &length);

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

        WSReleaseNetworkAddressList(env, theList, length);
    }
}

See Also

WSGetNetworkAddressList()  WSGetDomainNameList()

Tutorials