-
Bug
-
Resolution: Fixed
-
P4
-
None
-
b04
-
Not verified
While looking at a heap dump I noticed that a lot of instances of SocketTubes where kept alive in memory. I was able to determine that the reason was that the test had retained all CompletableFuture returned by HttpClient, and there was a back reference from CF -> HttpResponseImpl -> HttpConnection -> SocketTube.
The reference to HttpConnection from HttpResponseImpl is only needed when establishing a WebSocket, so maybe we should set it to null in the normal case to avoid keeping this objects alive when the returned HttpResponse is held and stored by user code?
The reference to HttpConnection from HttpResponseImpl is only needed when establishing a WebSocket, so maybe we should set it to null in the normal case to avoid keeping this objects alive when the returned HttpResponse is held and stored by user code?