WSReleaseDomainNameList (C 函数)
void WSReleaseDomainNameList(WSENV env,char **l,int n)
释放储存在长度为 n 的列表 l 中的 WSGetDomainNameList() 分配的内存.
范例
基本范例 (1)
#include "wstp.h"
/* A function that reads the domain names available on a machine */
void f(WSENV env)
{
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);
}
}