eric6iese opened a new pull request, #2467: URL: https://github.com/apache/cxf/pull/2467
If the wrappedStream corresponds to pout then it should be nulled as well. this fixes a memoryleak caused when pout is a PipedOutputStream, as the pipe holds a strong reference to the client thread which must be nulled to avoid MemoryLeaks in class like ThreadLocalClientState, which utilizes the same thread as a key for weakhashmap which in turn points to this very outputstream. this means that the thread is both the key and within the value of an entry of the weakhashamp, and as per the javadoc of said class, the GC cannot detect these cycles. to break this cycle, not only pout but also the wrappedStream needs to be nulled. An alternative, simpler solution would be to always null the wrappedStream, but I did not debug the code enough to be sure if this is safe in all usecases like the retransmission. I am also not sure if it would also be necessary to null the cachedOutputStream, as it could point to the PipedOutputStream as well. I've tried to keep the fix simpler this time, if you need additional tests, then let me now. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@cxf.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org