Fix regression introduced by f765053ae7 by use Entry after it is recycled

This commit is contained in:
Norman Maurer 2015-05-27 16:56:05 +02:00
parent ee1219b6b7
commit ed4a89082b

View File

@ -441,11 +441,12 @@ final class PoolThreadCache {
@SuppressWarnings({ "unchecked", "rawtypes" })
private void freeEntry(Entry entry) {
PoolChunk chunk = entry.chunk;
long handle = entry.handle;
// recycle now so PoolChunk can be GC'ed.
entry.recycle();
chunk.arena.freeChunk(chunk, entry.handle, sizeClass);
chunk.arena.freeChunk(chunk, handle, sizeClass);
}
static final class Entry<T> {