Date: Thu, 28 Mar 2024 03:37:13 -0700 (PDT) Message-ID: <390593952.145.1711622233103@wiki.srpcs.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_144_1946291351.1711622233103" ------=_Part_144_1946291351.1711622233103 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Deallocates a JSON Entity from memory.
Syntax
Result =3D SRP_Jso= n(Handle, "Release")
Returns 1 if successful, 0 if not.
Parameter | Description |
---|---|
Handle | Handle to a JSON Entity. Required.<= /strong> |
The Release service removes a JSON entity from memory. Once Released, it= is no longer valid. In fact, the Release service sets Handle to 0 to ensur= e the old handle will not be used accidentally. Any JSON entity created by = the New or&nbs= p;Parse services = must be deallocated from memory when no longer needed. Forgetting to do thi= s on occasion will not cause a fatal error since SRP Utilities will clean u= p all its memory when OpenInsight closes, but frequently failing to Release= entities causes memory to get used up, which can become a problem over lon= g periods of time.
// Let's create so= me entities. Success =3D SRP_Json(ObjectHandle, "New", "Object") Success =3D SRP_Json(IntegerHandle, "New", "Number", "1234567890") Success =3D SRP_Json(DecimalHandle, "New", "Number", "123456789.987654321") Success =3D SRP_Json(StringHandle, "New", "String", "Hello, World!") Success =3D SRP_Json(BooleanHandle, "New", "Boolean", 1) Success =3D SRP_Json(ArrayHandle, "New", "Array") // Don't forget to Release them when we're done SRP_Json(ArrayHandle, "Release") SRP_Json(BooleanHandle, "Release") SRP_Json(StringHandle, "Release") SRP_Json(DecimalHandle, "Release") SRP_Json(IntegerHandle, "Release") SRP_Json(ObjectHandle, "Release")