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 1472 - Memory leak: open_audio_device create thread and not free it
Summary: Memory leak: open_audio_device create thread and not free it
Status: RESOLVED ENDOFLIFE
Alias: None
Product: SDL
Classification: Unclassified
Component: thread (show other bugs)
Version: 1.2.15
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-11 10:53 UTC by Rodolfo
Modified: 2015-08-25 09:38 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rodolfo 2012-04-11 10:53:35 UTC
I made a simple code using SDL_OpenAudio() function and valgrind yells a memory leak.

SDL_ThreadsInit() creates a mutex that will never be freed.


Valgrind log:

==13346== 40 bytes in 1 blocks are still reachable in loss record 32 of 197
==13346==    at 0x04027034: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==13346==    by 0x04a7c1c3: SDL_CreateMutex (in /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0.11.4)
==13346==    by 0x04a36de8: SDL_ThreadsInit (in /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0.11.4)
==13346==    by 0x04a3706c: SDL_CreateThread (in /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0.11.4)
==13346==    by 0x04a2f046: SDL_OpenAudio (in /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0.11.4)
[...]
Comment 1 Ryan C. Gordon 2015-08-25 09:38:23 UTC
Hello, and sorry if you're getting several copies of this message by email, since we are closing many bugs at once here.

We have decided to mark all SDL 1.2-related bugs as RESOLVED ENDOFLIFE, as we don't intend to work on SDL 1.2 any further, but didn't want to mark a large quantity of bugs as RESOLVED WONTFIX, to clearly show what was left unattended to and make it easily searchable.

Our current focus is on SDL 2.0.

If you are still having problems with an ENDOFLIFE bug, your absolute best option is to move your program to SDL2, as it will likely fix the problem by default, and give you access to modern platforms and tons of super-cool new features.

Failing that, we _will_ accept small patches to fix these issues, and put them in revision control, although we do not intend to do any further official 1.2 releases.

Failing that, please feel free to contact me directly by email (icculus@icculus.org) and we'll try to find some way to help you out of your situation.

Thank you,
--ryan.