MLReleaseNetworkAddressList (C 函数)
MLReleaseNetworkAddressList 已经被 WSReleaseNetworkAddressList 所取代.
void MLReleaseNetworkAddressList(MLENV env,char **l,int n)
释放存储长度为 n 的列表 l,由 MLGetNetworkAddressList() 分配的内存.
范例
基本范例 (1)
#include "mathlink.h"
/* A function that reads the IP addresses available on a machine */
void f(MLENV env)
{
char **theList = NULL;
char *tmp;
unsigned long length;
theList = MLGetNetworkAddressList(env, &length);
if(length > 0 && theList != (char **)0)
{
while((tmp = *theList++) != (char *)0)
{
/* ... */
}
MLReleaseNetworkAddressList(env, theList, length);
}
}