Memory Leak Fix modern port

Fixes multiple memory leaks in Minecraft, both client-side and server-side