WSReleaseString (C 函数)

void WSReleaseString(WSLINK link,const char *s)

释放由 WSGetString() 分配的存储字符字符串 s 的内存.

更多信息

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

范例

基本范例  (1)

#include "wstp.h"

/* read a C string from a link and then release that memory to WSTP for deallocation */

void f(WSLINK lp)
{
    const char *s;

    if(! WSGetString(lp, &s))
        { /* unable to read the string from lp */ }

/* ... */

    WSReleaseString(lp, s);
}