Michael

Code:
Procedure Test
    Handle  hoJson
    Boolean bOK
    
    Get Create (RefClass(cJsonObject)) to hoJson  // hoJson is 11
    Get ParseString of hoJson '{"obj": {"Foo": "Bar"}}' to bOK
    Showln (MemberValue(Member(hoJson, "obj"), "Foo"))  // Shows "Bar"
    Get Create (RefClass(cJsonObject)) to WindowIndex  // WindowIndex is 13
    Send Destroy of WindowIndex
    Showln (Name(12))  // Shows "oJsonObject"
    Send Destroy of hoJson
    Get Create (RefClass(cJsonObject)) to WindowIndex  // WindowIndex is 11
    Send Destroy of WindowIndex
    Showln (Name(12))  // Shows "oJsonObject"
End_Procedure

Send Test
Get Create (RefClass(cJsonObject)) to WindowIndex  // WindowIndex is 11
Showln (Name(12))  // Shows "oJsonObject"
Stepping through, it does appear that after the "Showln (MemberValue(Member(hoJson, "obj"), "Foo"))" line another object - 12 - has been created. Checking the output of Showln (Name(12)) at various points makes it clear that object 12 stays alive in perpetuity! (Unless there is periodic garbage collection going on... and you say not.)

Conclusion: (MemberValue(Member(hoJson, "obj"), "Foo")) is not OK! Do not do this; an - effectively anonymous - object gets created and, lacking a handle to it, cannot be destroyed. In essence, a memory leak.

Mike