From ba201f61ead1688468548b12b6c21b80cec63f7d Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Sun, 16 Mar 2014 06:56:49 -0700 Subject: [PATCH] [#2323] Make it clear a Channel must be closed to release all resources Motivation: Ensure the user know the Channel must be closed to release resources like filehandles. Modifications: Add some extra javadoc. Result: More clear documentation --- transport/src/main/java/io/netty/channel/Channel.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/transport/src/main/java/io/netty/channel/Channel.java b/transport/src/main/java/io/netty/channel/Channel.java index 431f378764..af8913ea60 100644 --- a/transport/src/main/java/io/netty/channel/Channel.java +++ b/transport/src/main/java/io/netty/channel/Channel.java @@ -69,6 +69,12 @@ import java.net.SocketAddress; * transport. Down-cast the {@link Channel} to sub-type to invoke such * operations. For example, with the old I/O datagram transport, multicast * join / leave operations are provided by {@link DatagramChannel}. + * + *

Release resources

+ *

+ * It is important to call {@link #close()} or {@link #close(ChannelPromise)} to release all + * resources once you are done with the {@link Channel}. This ensures all resources are + * released in a proper way, i.e. filehandles. */ public interface Channel extends AttributeMap, Comparable {