The java.net.AbstractPlainDatagramSocketImpl and AbstractPlainSocketImpl have finalize methods that call close() to free FileDescriptors when the objects are no longer referenced. The cleanup behavior is not specified and can be reimplemented to use the Cleaner to more efficiently free FileDescriptors.
- relates to
-
JDK-8196716 Refactor Cleaner Registration to avoid resource leak
- Open
-
JDK-8200304 TwoStacksPlainDatagramSocketImpl and socket cleaner
- Closed
-
JDK-8199931 java/net/MulticastSocket/UnreferencedMulticastSockets.java fails with "incorrect data received"
- Closed
-
JDK-8253568 Replace and mitigate Object.finalize() uses in JDK libraries
- Open