if if have an object (in my case TJSONData) and I want to free this object the programm flow sometimes hangs at this position. I already have a construct like the following in my code but it seems to not fit the case some times:
if Assigned(MyRecord.MyJSONData) then
begin
MyRecord.MyJSONData.Free;
end;
I can reproduce this behavior in tests if I try to free an object two times. In my program this should normally not happen but now my real question:
Is there a way to check if the object is already free? Or do I need to use also FreeAndNil();?