Author: mturk
Date: Fri Apr 17 10:31:32 2009
New Revision: 765937
URL: http://svn.apache.org/viewvc?rev=765937&view=rev
Log:
Add some warning about calling free()
Modified:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/DirectByteBuffer.java
Modified:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/DirectByteBuffer.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/DirectByteBuffer.java?rev=765937&r1=765936&r2=765937&view=diff
==============================================================================
---
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/DirectByteBuffer.java
(original)
+++
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/DirectByteBuffer.java
Fri Apr 17 10:31:32 2009
@@ -269,6 +269,12 @@
* Invoke this method only on ByteBuffers
* that were created by {...@code DirectByteBuffer.allocate} methods.
* </p>
+ * <p>
+ * <b>Warning:</b><br/>
+ * This method must be called when the buffer is no longer needed.
+ * Failing to do so will leak system memory resources, causing memory
+ * growth because the underlying memory has to be explicitly released.
+ * </p>
* @param buf Previously allocated ByteBuffer to be deallocated.
*
* @throws NullPointerException if {...@code buf} is null