Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Syntax

Code Block
Result = SRP_JSONJson(Handle, "RELEASERelease")

Returns

Returns 1 if successful, 0 if not.

Parameters

ParameterDescription
HandleHandle to a JSON Entity. Required.

Remarks

The RELEASE Release service removes a JSON entity from memory. Once releasedReleased, it is no longer valid. In fact, the RELEASE Release service sets Handle to 0 to ensure the old handle will not be used accidentally. Any JSON entity created by the NEWNew or PARSEParse services must be deallocated from memory when no longer needed. Forgetting to do this on occasion will not cause a fatal error since SRP Utilities will clean up all its memory when OpenInsight closes, but frequently failing to release Release entities causes memory to get used up, which can become a problem over long periods of time.

Example

Code Block
// Let's create some entities.
Success = SRP_JSONJson(ObjectHandle, "NEWNew", "OBJECT")
Success = SRP_JSONJson(IntegerHandle, "NEWNew", "NUMBER", "1234567890")
Success = SRP_JSONJson(DecimalHandle, "NEWNew", "NUMBER", "123456789.987654321")
Success = SRP_JSONJson(StringHandle, "NEWNew", "STRING", "Hello, World!")
Success = SRP_JSONJson(BooleanHandle, "NEWNew", "BOOLEAN", 1)
Success = SRP_JSONJson(ArrayHandle, "NEWNew", "ARRAY")

// Don't forget to releaseRelease them when we're done
SRP_JSONJson(ArrayHandle, "RELEASERelease")
SRP_JSONJson(BooleanHandle, "RELEASERelease")
SRP_JSONJson(StringHandle, "RELEASERelease")
SRP_JSONJson(DecimalHandle, "RELEASERelease")
SRP_JSONJson(IntegerHandle, "RELEASERelease")
SRP_JSONJson(ObjectHandle, "RELEASERelease")

See Also

NEWNewPARSEParse