MLReleaseUTF32LinkName (C Function)

MLReleaseUTF32LinkName has been replaced by WSReleaseUTF32LinkName.

void MLReleaseUTF32LinkName(MLINK l, const unsigned int *n, int v)

releases memory allocated by MLUTF32LinkName() to store the UTF-32 encoded link name n, an array of length v.

Details

  • The memory allocated to store the link name n must have been allocated by a call to MLUTF32LinkName().
  • MLReleaseUTF32LinkName() is declared in the MathLink header file mathlink.h.

Examples

Basic Examples  (1)

#include "mathlink.h"

/* A function for reading a name for a link */

void f(MLINK l)
{
    const unsigned int *name;
    int length;

    name = MLUTF32LinkName(l, &length);

    /* We check for length <= 1 here because MLUTF32LinkName
    returns a string with a byte order mark */

    if(name == (const unsigned int *)0 || length <= 1)
    { /* Unable to get the name of the link */ }

    /* ... */

    MLReleaseUTF32LinkName(l, name, length);
}