WSReleaseLinkName()
This feature is not supported on the Wolfram Cloud.

void WSReleaseLinkName(WSLINK l, const char *n)
releases memory allocated by WSLinkName() to store the link name n for the WSTP connection specified by l.

DetailsDetails

  • The memory used by the name n must have been created by a call to WSLinkName().
  • WSReleaseLinkName() is declared in the WSTP header file wstp.h.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "wstp.h"

int main(int argc, char **argv)
{
    WSENV env;
    WSINK link;
    int error;
    const char *name;

    env = WSInitialize((WSEnvironmentParameter)0);
    if(env == (WSENV)0)
    { /* Unable to create the WSTP environment object */ }

    link = WSOpenArgcArgv(env, argc, argv, &error);
    if(link == (WSINK)0 || error != WSEOK)
    { /* Unable to create link */ }

    WSActivate(link);

    name = WSLinkName(link);
    if(name == (const char *)0)
    { /* Unable to get the link name */ }

    /* ... */

    WSReleaseLinkName(link, name);

    /* ... */

    WSClose(link);
    WSDeinitialize(env);
    return 0;
}