You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No memory leak on repeated connect/disconnect calls.
Actual behaviour
Library is leaking memory when you try to repeatedly connect/disconnect in attempt to reconnect to remote host after some form of network interruption leading to a disconnection. Not sure if there's any better approach to reconnecting.
It will repeatedly connect and disconnect to the single pub socket. Unfortunatelly Close/Disconnect/Dispose methods won't fully cleanup used resources as visible on Visual Studio profiler:
There is ever increasing number of Pipe instances.
I've been trying to pinpoint the issue in cloned repository but I'm unable to find it. What I've noticed is that when counting created Pipe instances only other 2nd pair will be garbage collected eg: (not entirely sure if it's a good indicator)
privatePipe(
ZObject parent, YPipe<Msg> inboundPipe, YPipe<Msg> outboundPipe,
int inHighWatermark, int outHighWatermark, int predefinedLowWatermark):base(parent){
...
_id = Interlocked.Increment(ref IdCounter);
Console.WriteLine($"Created: {_id}");}~Pipe(){
Console.WriteLine($"Finalized: {_id}");}
Environment
Expected behaviour
No memory leak on repeated connect/disconnect calls.
Actual behaviour
Library is leaking memory when you try to repeatedly connect/disconnect in attempt to reconnect to remote host after some form of network interruption leading to a disconnection. Not sure if there's any better approach to reconnecting.
Steps to reproduce the behaviour
Consider given code:
It will repeatedly connect and disconnect to the single
pub
socket. UnfortunatellyClose
/Disconnect
/Dispose
methods won't fully cleanup used resources as visible on Visual Studio profiler:There is ever increasing number of
Pipe
instances.I've been trying to pinpoint the issue in cloned repository but I'm unable to find it. What I've noticed is that when counting created
Pipe
instances only other 2nd pair will be garbage collected eg: (not entirely sure if it's a good indicator)This suggests that the pipes of
pub
sockets are left around.The memory has been leaking over the span of several days/weeks including the case where the
pub
socket was on remote system.Thanks for help!
The text was updated successfully, but these errors were encountered: