You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The behavior I am noticing is on Wayland using SDL 3.1.10. When I call SDL_ShowOpenFileDialog and then cancel the dialog, I notice a memory leak. I found (using the power of Zig's awesome debug allocator) that the following allocations are not freed:
While I don't know the codebase very well, I did some printf debugging and what seems to be happening is that the callback is going into this if statement when the user cancels the dialog, which has the line goto handled, which apparently skips the cleanup for those two allocations.
This seems like the cause of the bug, but I am hesitant to fix it myself because I am not very familiar with the codebase. I am not sure what the intent of goto handled is as opposed to goto cleanup in the other code paths.
The text was updated successfully, but these errors were encountered:
The behavior I am noticing is on Wayland using SDL 3.1.10. When I call
SDL_ShowOpenFileDialog
and then cancel the dialog, I notice a memory leak. I found (using the power of Zig's awesome debug allocator) that the following allocations are not freed:here and here.
While I don't know the codebase very well, I did some
printf
debugging and what seems to be happening is that the callback is going into this if statement when the user cancels the dialog, which has the linegoto handled
, which apparently skips the cleanup for those two allocations.This seems like the cause of the bug, but I am hesitant to fix it myself because I am not very familiar with the codebase. I am not sure what the intent of
goto handled
is as opposed togoto cleanup
in the other code paths.The text was updated successfully, but these errors were encountered: