WSReleaseSymbol (C 函数)

void WSReleaseSymbol(WSLINK link,char *s)

释放由 WSGetSymbol()WSGetFunction() 分配的对应于符号名称的字符字符串 s 的内存.

更多信息

  • WSTP 的标头文件 wstp.h 已对 WSReleaseSymbol() 作出声明.

范例

基本范例  (1)

#include "wstp.h"

/* read a symbol from a link and then release the memory to WSTP for deallocation */

void f(WSLINK lp)
{
    char *sym;

    if(! WSGetSymbol(lp, &sym))
        { /* unable to read a symbol from lp */ }

    /* ... */

    WSReleaseSymbol(lp, sym);
}