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

void WSDeinitialize(WSENV env)
destructs the WSTP environment object.

DetailsDetails

  • The WSTP environment object stores the global state of WSTP during the execution of a program.
  • WSDeinitialize() must be called before the program exits.
  • WSClose() must be called for all open links before calling WSDeinitialize().
  • An appropriate call to WSDeinitialize() is generated automatically when an external program is created from WSTP templates.
  • WSDeinitialize() 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)
{
    MLENV ep;

    ep = WSInitialize((WSEnvironmentParameter)0);

    ...

    WSDeinitialize(ep);
    return 0;
}