WSReleaseParameters (C Function)

void WSReleaseParameters( WSEnvironmentParameter e )

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

Details

  • The environment parameter object e must have been created by a call to WSNewParameters().
  • WSReleaseParameters() is declared in the WSTP header file wstp.h.

Examples

Basic Examples  (1)

#include "wstp.h"

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

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


int main()
{
    WSEnvironmentParameter ep;
    WSENV env;

    ep = WSNewParameters(WSREVISION, WSAPIREVISION);
    if(ep == (WSEnvironmentParameter)0)
    { /* Unable to create a new environment parameter object */ }

    WSSetAllocParameter(ep, Alloc, Free);

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

    WSReleaseParameters(ep);

    /* ... */

    WSDeinitialize(env);

    return 0;
}