We use cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.
Hello,
In the unit sgcWebSocket_Client I found a strange behaviour at line 932 where the field FWSConnection is set to nil.
This creates a memory leak in the destroy method of the inherited TsgcWSClient where you do this:
destructor TsgcWSClient.Destroy;
begin
Active := False;
DoClear;
sgcFree(FQueueOptions);
sgcFree(FLoadBalancer); sgcFree(FWSConnection);
sgcFree(FAuthentication);
sgcFree(FOptions);
sgcFree(FProxy);
inherited;
end;
As the FreeAndNil function check if FWSConnection is nil then it destroy nothing.
If I comment the line 932 then everything works fine and no more memory leaks (more or less, but I'll try tomorrow). But I don't know what this implies...
This memory leak is a bit confusing inside my big application and it grows memory when it shouldn't. I see my application growing memory with a lot of connections\disconnections.
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here. Register Here »