#1 2018-02-09 13:28:51

EduardoShibukawa
Member
Registered: 2018-02-01
Posts: 5

TSQLHttpClient.Free Acess Violation

After update my mORMot repository it has started to thrown an Acess Violation Exception,
i have just removed the fSessionUser.Free and it worked normally.

destructor TSQLRestClientURI.Destroy;
   ...
    SessionClose; // if not already notified <- Here it executes a FreeAndNil(fSessionUser)
  finally
    // release memory and associated classes
    if fRemoteLogClass<>nil then begin
      {$ifndef LVCL}
      FreeAndNil(fRemoteLogThread);
      {$endif}
      ServerRemoteLogStop;
    end;
    fSessionUser.Free; <- Here throw an Acess Violation, because the fSessionUser it's already Free
   ...
end;

Offline

#2 2018-02-09 15:14:50

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: TSQLHttpClient.Free Acess Violation

FreeAndNil(fSessionUser) set fSessionUser = nil so fSessionUser.Free does not make an access violation..

Offline

Board footer

Powered by FluxBB