MLReleaseParameters (C Function)

MLReleaseParameters has been replaced by WSReleaseParameters.

void MLReleaseParameters( MLEnvironmentParameter e )

releases memory allocated by MLNewParameters() and stored in e.

Details

  • The environment parameter object e must have been created by a call to MLNewParameters().
  • MLReleaseParameters() is declared in the MathLink header file mathlink.h.

Examples

Basic Examples  (1)

#include "mathlink.h"

void * Alloc(unsigned long l)
{
    /* ... */
}

void Free(void *m)
{
    /* ... */
}


int main()
{
    MLEnvironmentParameter ep;
    MLENV env;

    ep = MLNewParameters(MLREVISION, MLAPIREVISION);
    if(ep == (MLEnvironmentParameter)0)
    { /* Unable to create a new environment parameter object */ }

    MLSetAllocParameter(ep, Alloc, Free);

    env = MLInitialize(ep);
    if(env == (MLENV)0)
    { /* Unable to initialize environment object */ }

    MLReleaseParameters(ep);

    /* ... */

    MLDeinitialize(env);

    return 0;
}