fyinthesky2011@gmail.com
public static ByteBuffer allocate (int capacity) //性能低于下面的Direct,因为是把内存建立在JVM堆上,容易被GC回收,可能需要多次重建public static ByteBuffer allocateDirect (int capacity) //脱离了JVM和GC,可以长时间驻留,使用的是NATIVE方法分配内存
posted on 2016-04-21 11:35 rojas 阅读(319) 评论(0) 编辑 收藏 举报