Skip to content

Commit

Permalink
Fix memory leak with emitters that weren't deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
mchorse committed Jul 1, 2021
1 parent d271252 commit 3414d14
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public void onUserLogOut(ClientDisconnectionFromServerEvent event)
{
ClientProxy.manager.reset();
ClientProxy.recordingOverlay.setVisible(false);
RenderingHandler.resetEmitters();

Minecraft.getMinecraft().addScheduledTask(StructureMorph::cleanUp);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@ public static void updateEmitters()
}
}

public static void resetEmitters()
{
emitters.clear();
}

/**
* Called by ASM
*/
Expand Down

0 comments on commit 3414d14

Please sign in to comment.