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 656

Summary: A memory leak in the SDL threads
Product: SDL Reporter: josua.sassen
Component: threadAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED INVALID QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2    
Version: 1.2.13   
Hardware: x86   
OS: Linux   

Description josua.sassen 2008-12-24 17:09:13 UTC
Hi, I think I discovered a memory leak in the SDL_thread lib. Every thread leaves a permanent RAM using of 8kiB(or kB) even if he died.
Just try out this program(C++): http://rafb.net/p/gxMZOy51.html
Every time you enter something(doesn't matter what) it launches a SDL_thread. This thread sends "Echo!" to stdout and then dies. Then follow the RAM using of this program. You'll see it increases by 8kiB per thread you launch, doesn't matter what you type in.
3 other people were able to confirm this bug on their machines.
Comment 1 josua.sassen 2008-12-26 08:51:28 UTC
Hmm, I discovered that it's no a bug, sry. I didn't know that I have to kill every thread by SDL_KillThread even if it is at his end(return)... (bad tutorial :/) But it would be nice if you don't have to :)