Continuing from this
Am I able to return a record from an endpoint - #3 by wlandgraf
When I am accepting the class from the endpoint
procedure OnResult (Response : TXDataClientResponse);
var
lRes : TJSObject;
LPlan_Added : TPlan_Added;
begin
if Response.Succeeded
then begin
LRes := TJSObject (Response.Result);
LPlan_Added := TPlan_Added(TObject(LRes));
if Assigned (ACBSuccess)
then ACBSuccess (LPlan_Added);
end
else OnFail (Response.Error_Msg);
end;
Where TPlan_Added is a class. Its just occurred to me that I am not freeing it in the caller. Will it get freed automatically because of scope and reference counting, or do I need to free it?