mirror of
https://github.com/filoghost/HolographicDisplays.git
synced 2024-12-30 04:37:42 +01:00
Reuse single instance of PacketByteBuffer
This commit is contained in:
parent
6be5f00f53
commit
51b0f7fd30
@ -13,8 +13,11 @@ import java.util.UUID;
|
||||
|
||||
class PacketByteBuffer extends PacketDataSerializer {
|
||||
|
||||
private static final PacketByteBuffer INSTANCE = new PacketByteBuffer();
|
||||
|
||||
static PacketByteBuffer get() {
|
||||
return new PacketByteBuffer(); // TODO try to clear and re-use a single instance
|
||||
INSTANCE.clear();
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
private PacketByteBuffer() {
|
||||
|
Loading…
Reference in New Issue
Block a user