Index: MVCFramework.JSONRPC.pas =================================================================== diff --git a/DMVC/sources/MVCFramework.JSONRPC.pas b/DMVC/sources/MVCFramework.JSONRPC.pas --- a/DMVC/sources/MVCFramework.JSONRPC.pas (revision 210) +++ b/DMVC/sources/MVCFramework.JSONRPC.pas (working copy) @@ -1406,7 +1406,7 @@ lJSONRespErrorInfo.Msg, lJSONRespErrorInfo.Data); end; finally - if not lJSONRespErrorInfo.Data.IsEmpty then + if not lExceptionHandled and not lJSONRespErrorInfo.Data.IsEmpty then begin if lJSONRespErrorInfo.Data.IsObjectInstance then begin @@ -2035,6 +2035,13 @@ procedure TJSONRPCResponseError.SetData(const Value: TValue); begin + if not FData.IsEmpty then + begin + if FData.IsObjectInstance then + begin + FData.AsObject.Free; + end; + end; fData := Value; end;