Allow pooled buffers to be manually cleared

This commit is contained in:
themode 2021-12-28 11:08:29 +01:00 committed by TheMode
parent 3f10829935
commit 18d8e60064
1 changed files with 4 additions and 0 deletions

View File

@ -29,6 +29,10 @@ public final class PooledBuffers {
POOLED_BUFFERS.relaxedOffer(new SoftReference<>(buffer.clear()));
}
public static void clear() {
POOLED_BUFFERS.clear();
}
public static int count() {
return POOLED_BUFFERS.size();
}