You are not logged in.
Pages: 1
Enter/Leave critical section without try..finally.
In mORMot.pas, procedure ComputeResult:
    if ForceServiceResultAsXMLObjectNameSpace='' then
      ForceServiceResultAsXMLObjectNameSpace := Service.ResultAsXMLObjectNameSpace;
    with Server.fStats do begin
      EnterCriticalSection(fLock);  <-- is there no lack of try finally?
      inc(fServiceInterface);
      Changed;
      LeaveCriticalSection(fLock); <--
    end;Offline
This was on purpose since we trusted the code in Changed, and wanted to have the smallest impact possible on performance here.
But a small try..finally could be safer here, you are right.
See https://synopse.info/fossil/info/d9c2eb9672
Offline
Pages: 1