From 266e9e47cc9055443175c2460b6dcac55ad09614 Mon Sep 17 00:00:00 2001 From: Dan Mulloy Date: Sun, 4 Jan 2015 17:54:12 -0500 Subject: [PATCH] Move null assignments after the proper checks --- .../protocol/injector/netty/ChannelInjector.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/netty/ChannelInjector.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/netty/ChannelInjector.java index 84f37e6a..f7735c33 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/netty/ChannelInjector.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/netty/ChannelInjector.java @@ -786,13 +786,13 @@ class ChannelInjector extends ByteToMessageDecoder implements Injector { // Clear cache factory.invalidate(player); + + // Clear player instances + // Should help fix memory leaks + this.player = null; + this.updated = null; } } - - // Clear player instances - // Should help fix memory leaks - this.player = null; - this.updated = null; } /**