-
Notifications
You must be signed in to change notification settings - Fork 615
Description
Memory dump of our running app shows something like this:
Both TcpClient and Socket objects have already been disposed, but still in memory referenced by TcpClientAdapter. TcpClientAdapter has private TcpClient / Socket field (depends of rabbitmq-dotnet-client version) which closed (disposed) in TcpClientAdapter.Close() method. We can consider this situation as memory leak with non-growing memory overhead.
It's annoying to have those broken and unused objects (with all inner object trees, e.g. byte arrays or ManualResetEvents) in memory and in profiler reports. These objects prevent from investigation real memory leaks.
Please, consider to break reference to TcpClient / Socket in TcpClientAdapter after Close() call.
Maybe, it's better to break reference a bit higher in call stack, e.g. SocketFrameHandler class.