Skip to content

Commit

Permalink
ImGui memory leak fix (#2284)
Browse files Browse the repository at this point in the history
* Start of ImGui leak fix

* Dispose of MouseState at end of UpdateImGuiInput
  • Loading branch information
rbertels authored Sep 25, 2024
1 parent b079b28 commit 14ee3f1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ private void UpdateImGuiInput()
{
var io = ImGuiNET.ImGui.GetIO();

var mouseState = _input.Mice[0].CaptureState();
using var mouseState = _input.Mice[0].CaptureState();

io.MouseDown[0] = mouseState.IsButtonPressed(MouseButton.Left);
io.MouseDown[1] = mouseState.IsButtonPressed(MouseButton.Right);
Expand Down

0 comments on commit 14ee3f1

Please sign in to comment.