jdk/src/share/classes/sun/nio/ch/Util.java
changeset 2057 3acf8e5e2ca0
parent 895 67f1dc69ad10
child 5506 202f599c92aa
--- a/jdk/src/share/classes/sun/nio/ch/Util.java	Wed Feb 11 13:16:53 2009 +0000
+++ b/jdk/src/share/classes/sun/nio/ch/Util.java	Sun Feb 15 12:25:54 2009 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,6 @@
 import java.nio.ByteBuffer;
 import java.nio.MappedByteBuffer;
 import java.nio.channels.*;
-import java.nio.channels.spi.*;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.*;
@@ -100,6 +99,9 @@
                 return;
             }
         }
+
+        // release memory
+       ((DirectBuffer)buf).cleaner().clean();
     }
 
     private static class SelectorWrapper {