MLReleaseDomainNameList (C Function)

MLReleaseDomainNameList has been replaced by WSReleaseDomainNameList.

void MLReleaseDomainNameList(MLENV env,char **l,int n)

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

Details

  • MLReleaseDomainNameList() is declared in the MathLink header file mathlink.h.

Examples

Basic Examples  (1)

#include "mathlink.h"

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

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

    theList = MLGetDomainNameList(env, &length);

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

        MLReleaseDomainNameList(env, theList, length);
    }
}