Date: Thu, 28 Mar 2024 14:58:57 +0100 (CET) Message-ID: <2146368751.5244.1711634337248@confluence-server> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_5243_186410725.1711634337248" ------=_Part_5243_186410725.1711634337248 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
The LMX_Free function free= s any allocated memory used by the licensing system and closes any open con= nection to a license server.
void LMX= _Free ( LMX_HANDLE LmxHandle );
LmxHandle<= br>[in] LM-X handle.
None.
A handle of value NULL is valid, b= ut does not cause cleanup.
Calling any other licensing functi= ons on the handle after this one will have undefined behavior.
Example
The following example shows the us=
e of the LMX_Free function, which deallocates all memory that was previousl=
y allocated by the licensing system.
It is important to note that you s= hould call this function before you leave the application that initialized = a handler.
#include= <lmx.h> #include <stdio.h> LMX_HANDLE h; int main() { LMX_FEATURE_INFO FI; LMX_STATUS s; exit_on_error(LMX_Init(&h)); if ((s =3D LMX_GetFeatureInfo(h,"nonExistingFeature", &FI)) !=3D LMX_= SUCCESS) { if (h !=3D NULL) { fprintf(stderr, "%s\n", LMX_GetErrorMessage(h)); } else { fprintf(stderr, "%s\n", LMX_GetErrorMessageSimple(s)); fflush(stderr); return 1; } } LMX_Free(h); return 0; }