RFR: 7181793: Socket getInputStream/getOutputStream create streams that cannot be GC'ed until Socket is closed

Seán Coffey sean.coffey at oracle.com
Tue Oct 9 06:34:22 PDT 2012


Requesting a review for this bug which cropped up whilst cleaning up the 
FileDescriptor & associated streams some time back (7105952)

Turns out that each call to a socket.getOutputStream() creates a new 
instance of SocketOutputStream. I'm not seeing any reason to why that 
code exists. One instance should be ok here. The getInputStream() method 
doesn't have this issue.

bug report : http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7181793
webrev : http://cr.openjdk.java.net/~coffeys/webrev.7181793.jdk8/ 
<http://cr.openjdk.java.net/%7Ecoffeys/webrev.7181793.jdk8/>

Regards,
Sean.



More information about the net-dev mailing list