It is not casual. I didn't find a way to free a DirectBuffer except than stopping the jvm. Please double check it, ten talented programmers are better than a dumb one ;-)
On Thursday, October 20, 2011, Akash Ashok <[email protected]> wrote: > I currently see that we have > > Cache.java > public static void clear() { > for (OffHeapMemoryBuffer buffer : buffers) { > buffer.clear(); > } > activeBuffer = buffers.get(0); > } > > OffHeapMemoryBuffer.java > > public void clear() { > allocationErrors = 0; > pointers.clear(); > createAndAddFirstPointer(); > buffer.clear(); > used.set(0); > } > > buffer.clear() doesn't actually deallocate the memory. I assume currently we > dnt have the feature of de-allocating memory which means that we can't > resize the cache once instantiated even if we want to. I feel we should have > this feature which would give deeper control on the Cache. > > > > Cheers, > Akash A >
