MLReleaseUCS2String (C 関数)

MLReleaseUCS2StringWSReleaseUCS2Stringに置き換えられた.

void MLReleaseUCS2String(MLINK link,unsigned short *s,int n)

文字列s を保持するために,MLGetUCS2String()で割り当てられたメモリを解放する.

詳細

  • MLReleaseUCS2String()は,MathLinkヘッダファイルmathlink.hの中で宣言される.

例題

  (1)

#include "mathlink.h"

/* read a UCS-2 encoding string from a link and then release the memory to MathLink for deallocation */

void f(MLINK lp)
{
    unsigned short *string;
    int length;

    if(! MLGetUCS2String(lp, &string, &length))
        { /* unable to read the UCS-2 string */ }

    /* ... */

    MLReleaseUCS2String(lp, string, length);
}