split off from #26 - the skin tracker has the exact same leak.
SkinTracker.initClient registers a ClientPlayConnectionEvents.DISCONNECT handler but the clear inside it is commented out (SkinTracker.java:67-69):
ClientPlayConnectionEvents.DISCONNECT.register((handler, client) -> {
// getInstance().clear();
});
SkinTracker is a HashMap<UUID, SkinData> that's filled from the server on sync (receive, SkinTracker.java:131-139 - just puts, never clears first). so when you leave a server its skins stay in the map and bleed into your next world / server.
fix: uncomment the getInstance().clear(); on DISCONNECT. could also clear at the start of receive for a clean resync.
same root cause as #26, and #21 (native registries) would kill this whole class of leak for free too.
split off from #26 - the skin tracker has the exact same leak.
SkinTracker.initClientregisters aClientPlayConnectionEvents.DISCONNECThandler but the clear inside it is commented out (SkinTracker.java:67-69):SkinTrackeris aHashMap<UUID, SkinData>that's filled from the server on sync (receive,SkinTracker.java:131-139- justputs, never clears first). so when you leave a server its skins stay in the map and bleed into your next world / server.fix: uncomment the
getInstance().clear();on DISCONNECT. could also clear at the start ofreceivefor a clean resync.same root cause as #26, and #21 (native registries) would kill this whole class of leak for free too.