From 911f7f5cf7579e816a6c4eea0eda1b89977fd9f9 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Thu, 31 Mar 2016 19:47:11 -0400 Subject: [PATCH] MC-100382: Fix Pathfinding Memory Leak https://bugs.mojang.com/browse/MC-100382 A reference to a ChunkCache is never cleaned up after doing a pathfind operation, resulting in leaking chunks. The leaked chunks then hold references to other entities that may also be leaking ChunkCache's, creating a cascading problem. By: Aikar --- paper-server/nms-patches/PathfinderAbstract.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 paper-server/nms-patches/PathfinderAbstract.patch diff --git a/paper-server/nms-patches/PathfinderAbstract.patch b/paper-server/nms-patches/PathfinderAbstract.patch new file mode 100644 index 0000000000..2748b17343 --- /dev/null +++ b/paper-server/nms-patches/PathfinderAbstract.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/PathfinderAbstract.java ++++ b/net/minecraft/server/PathfinderAbstract.java +@@ -23,7 +23,7 @@ + this.f = MathHelper.d(entityinsentient.width + 1.0F); + } + +- public void a() {} ++ public void a() { this.a = (IBlockAccess) null; } // CraftBukkit - don't leak Chunk Cache + + protected PathPoint a(int i, int j, int k) { + int l = PathPoint.b(i, j, k);