mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-26 02:19:48 -05:00
Also set adapter to null in unload method to prevent memory leak
This commit is contained in:
1 parent
d2af7ac3f2
commit
994a163207
1 file changed
+2
@@ -386,6 +386,8 @@ public class VirtualDisplayItem extends DisplayItem {
|
||||
packetSenders.clear();
|
||||
if (packetAdapter != null) {
|
||||
protocolManager.removePacketListener(packetAdapter);
|
||||
//Prevent memory leak
|
||||
packetAdapter = null;
|
||||
}
|
||||
if (asyncPacketSenderTask != null) {
|
||||
asyncPacketSenderTask.stop();
|
||||
|
||||
Reference in new issue
Block a user