diff options
author | Aaron M. Renn <arenn@urbanophile.com> | 1998-06-10 00:28:41 +0000 |
---|---|---|
committer | Aaron M. Renn <arenn@urbanophile.com> | 1998-06-10 00:28:41 +0000 |
commit | 4d7dae1f16248d9e0d12e3e2765c91faeaee3c7d (patch) | |
tree | e8114e446853dc572fc814bb5fdec10970c87692 /java/net/DatagramSocket.java | |
parent | e1e4758f89b1f8916e03f7f7692b069e4aa62774 (diff) | |
download | classpath-4d7dae1f16248d9e0d12e3e2765c91faeaee3c7d.tar.gz |
Added finalize method
Diffstat (limited to 'java/net/DatagramSocket.java')
-rw-r--r-- | java/net/DatagramSocket.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/java/net/DatagramSocket.java b/java/net/DatagramSocket.java index 3fef08592..60e73c6ca 100644 --- a/java/net/DatagramSocket.java +++ b/java/net/DatagramSocket.java @@ -126,6 +126,17 @@ DatagramSocket(int port, InetAddress addr) throws SocketException /*************************************************************************/ /** + * Ensure that the socket is closed when this object is garbage collected + */ +protected void +finalize() throws IOException +{ + close(); +} + +/*************************************************************************/ + +/** * Closes this socket. */ public synchronized void |