From 38d1a64bf5c7bc1c9c5cd3bb69d155b7973bbfc5 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Fri, 24 Jun 2022 15:03:48 +0100 Subject: [PATCH] Correctly recycle CharSetBlocks --- .../core/queue/implementation/blocks/CharSetBlocks.java | 1 + .../core/queue/implementation/chunk/ChunkHolder.java | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/blocks/CharSetBlocks.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/blocks/CharSetBlocks.java index 5f6062208..3cbb5ccdf 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/blocks/CharSetBlocks.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/blocks/CharSetBlocks.java @@ -51,6 +51,7 @@ public class CharSetBlocks extends CharBlocks implements IChunkSet { @Override public synchronized void recycle() { + reset(); POOL.offer(this); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/chunk/ChunkHolder.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/chunk/ChunkHolder.java index d54b82ead..9347ecf59 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/chunk/ChunkHolder.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/chunk/ChunkHolder.java @@ -1046,7 +1046,6 @@ public class ChunkHolder> implements IQueueChunk { try { return this.call(chunkSet, () -> { this.delegate = NULL; - chunkSet.recycle(); chunkSet = null; calledLock.unlock(stamp); });