MLReleaseLinkName (C Function)

MLReleaseLinkName has been replaced by WSReleaseLinkName.

void MLReleaseLinkName( MLINK l , const char * n )

releases memory allocated by MLLinkName() to store the link name n for the MathLink connection specified by l.

Details

  • The memory used by the name n must have been created by a call to MLLinkName().
  • MLReleaseLinkName() is declared in the MathLink header file mathlink.h.

Examples

Basic Examples  (1)

#include "mathlink.h"

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

    env = MLInitialize((MLEnvironmentParameter)0);
    if(env == (MLENV)0)
    { /* Unable to create the MathLink environment object */ }

    link = MLOpenArgcArgv(env, argc, argv, &error);
    if(link == (MLINK)0 || error != MLEOK)
    { /* Unable to create link */ }

    MLActivate(link);

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

    /* ... */

    MLReleaseLinkName(link, name);

    /* ... */

    MLClose(link);
    MLDeinitialize(env);
    return 0;
}