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
int main(void) {
if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMEPAD | SDL_INIT_JOYSTICK | SDL_INIT_EVENTS)) {
exit(1);
}
int display_count;
SDL_DisplayID* displays = SDL_GetDisplays(&display_count);
SDL_Rect r;
while (true) {
SDL_GetDisplayUsableBounds(displays[0], &r)
}
SDL_free(displays);
}
Hi SDL folks!
I found my application's memory growing unbounded at some point, and tracked down the issue that is caused by one of imgui function calling SDL_GetDisplayUsableBounds(displays[0], &r). It does not seem like we need to free anything with this call tho. (Currently only tested it on macOS)
Above is the minimum example to see the memory growing unbounded.
Using Xcode profiler, the call eventually calls into [visibleFrame], so I am not sure if this is SDL or Cocoa's problem. This is my first time filing issues. Thanks for any feedback on this!
The text was updated successfully, but these errors were encountered:
qiming2
changed the title
SDL_GetDisplayUsableBounds call would grow memory without freeing resources? (MacOS)
SDL_GetDisplayUsableBounds call would grow memory without freeing resources? (MacOS/SDL3)
Mar 17, 2025
Hi SDL folks!
I found my application's memory growing unbounded at some point, and tracked down the issue that is caused by one of imgui function calling SDL_GetDisplayUsableBounds(displays[0], &r). It does not seem like we need to free anything with this call tho. (Currently only tested it on macOS)
Above is the minimum example to see the memory growing unbounded.
Using Xcode profiler, the call eventually calls into [visibleFrame], so I am not sure if this is SDL or Cocoa's problem. This is my first time filing issues. Thanks for any feedback on this!
The text was updated successfully, but these errors were encountered: