void WSReleaseUnicodeContainer(WSUnicodeContainer *c)

releases the memory used to store the WSUnicodeContainer object c.


  • WSReleaseUnicodeContainer() is used in conjunction with WSNewUnicodeContainer() to create and destroy WSUnicodeContainer objects in WSTP template files. The WSUnicodeContainer is a convenient object for passing Unicode strings and their lengths between functions in template files..
  • In most cases, the WSTP template file processor program mprep will generate code that automatically calls WSReleaseUnicodeContainer().
  • WSReleaseUnicodeContainer() is declared in the WSTP header file wstp.h.


Basic Examples  (1)

#include "wstp.h"

/* A simple function for sending a Unicode string using a WSUnicodeContainer object */

void f(WSUnicodeContainer *container, WSLINK link)
    if(container == (WSUnicodeContainer *)0)

        case UCS2ContainerType:
            if(! WSPutUCS2String(link, WSUCS2String(container),
            { /* Unable to send the UCS-2 encoded string */ }
        case UTF8ContainerType:
            if(! WSPutUTF8String(link, WSUTF8String(container),
            { /* Unable to send the UTF-8 encoded string */ }
        case UTF16ContainerType:
            if(! WSPutUTF16String(link, WSUTF16String(container),
            { /* Unable to send the UTF-16 encoded string */ }
        case UTF32ContainerType:
            if(! WSPutUTF32String(link, WSUTF32String(container),
            { /* Unable to send the UTF-32 encoded string */ }


See Also

WSNewUnicodeContainer()  WSUnicodeContainer  WSUnicodeContainerType  mprep  mcc