We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3289 - Memory leak when resizing a window
Summary: Memory leak when resizing a window
Status: RESOLVED INVALID
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: 2.0.4
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-14 22:17 UTC by Jukka Holappa
Modified: 2016-03-15 20:13 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jukka Holappa 2016-03-14 22:17:32 UTC
There seems to be a memory leak that happens during every window resize event on Linux+X11 platform with libSDL 2.0.4:

==13386== 276,045 bytes in 8,365 blocks are definitely lost in loss record 95 of 96
==13386==    at 0x4C28F40: malloc (vg_replace_malloc.c:296)
==13386==    by 0x7449BB0: XGetWindowProperty (in /usr/lib64/libX11.so.6.3.0)
==13386==    by 0x4F112A7: X11_DispatchEvent (SDL_x11events.c:572)
==13386==    by 0x4F11D77: X11_PumpEvents (SDL_x11events.c:1017)
==13386==    by 0x4E85E68: SDL_PumpEvents_REAL (SDL_events.c:402)
==13386==    by 0x4E85E68: SDL_WaitEventTimeout_REAL (SDL_events.c:435)
==13386==    by 0x4E85E68: SDL_PollEvent_REAL (SDL_events.c:417)
==13386==    by 0x42588C: main (main.cpp:163)

Lost memory is quite large in above example as I tried to verify the leak by just resizing a window for a while.
Comment 1 Philipp Wiesemann 2016-03-15 19:06:49 UTC
The provided line numbers seem to be from SDL 2.0.3 not SDL 2.0.4.

If this memory leak is in SDL 2.0.3 then it may have been fixed with bug 2502.
Comment 2 Jukka Holappa 2016-03-15 19:54:55 UTC
It looks like I did have some old libSDL2 library that managed to get into path before a new version I thought I was testing. I will verify that the problem is fixed in the new version but this looks like it was just my error this time.

Sorry about the noise.
Comment 3 Jukka Holappa 2016-03-15 20:13:04 UTC
2.0.4 does not have the leak I originally reported.