mirror of
https://github.com/Minestom/Minestom.git
synced 2025-03-10 05:39:11 +01:00
Allow pooled buffers to be manually cleared
This commit is contained in:
parent
3f10829935
commit
18d8e60064
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user