@ -1145,18 +1145,18 @@ public final class BufferUtils {
}
/ * *
* DirectByteB uffers are garbage collected by using a phantom reference and a
* Direct b uffers are garbage collected by using a phantom reference and a
* reference queue . Every once a while , the JVM checks the reference queue and
* cleans the DirectByteB uffers. However , as this doesn ' t happen
* immediately after discarding all references to a DirectByteB uffer, it ' s
* easy to OutOfMemoryError yourself using DirectByteB uffers. This function
* explicitly calls the Cleaner method of a DirectByteB uffer.
* cleans the direct b uffers. However , as this doesn ' t happen
* immediately after discarding all references to a direct b uffer, it ' s
* easy to OutOfMemoryError yourself using direct b uffers. This function
* explicitly calls the Cleaner method of a direct b uffer.
*
* @param toBeDestroyed
* The DirectByteB uffer that will be "cleaned" . Utilizes reflection .
* The direct b uffer that will be "cleaned" . Utilizes reflection .
*
* /
public static void destroyByte Buffer ( Buffer toBeDestroyed ) {
public static void destroyDirect Buffer ( Buffer toBeDestroyed ) {
if ( ! toBeDestroyed . isDirect ( ) ) {
return ;