SDL icon indicating copy to clipboard operation
SDL copied to clipboard

SDL2 memory leak in WSL2

Open MrWeast opened this issue 1 year ago • 4 comments

Using very basic program of: image

I get a pretty substantial memory leak: image

MrWeast avatar May 26 '24 03:05 MrWeast

Out of curiosity, does this happen with SDL3?

slouken avatar May 26 '24 15:05 slouken

I'm not sure. I haven't tried SDL3. My understanding is that an official stable release hasn't come out yet for SDL3 so I was waiting on that before trying out SDL3.

MrWeast avatar May 26 '24 16:05 MrWeast

SDL2 built under WSL2, is similar to building SDL2 on Linux. So aren't leaks from 3rd party libraries expected? Most/all leaks are from libdecor, gtk and dbus.

madebr avatar May 26 '24 18:05 madebr

Using these suppressions with valgrind:

{ wsl2 Memcheck:Leak ... obj:/usr/lib/wsl/drivers/* ... }

{ valgrind_leaks Memcheck:Leak ... obj:/usr/libexec/valgrind/* ... }

Will suppress all of the memory leaks: image

MrWeast avatar May 26 '24 23:05 MrWeast