| Summary: | SDL appears to have memory leaks | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Michael Buchoff <mbuchoff> |
| Component: | main | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | ||
| Version: | 1.2.11 | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Attachments: | Output from valGrind | ||
Created attachment 217 [details]
Output from valGrind
Sorry, I was mistaken on the version number. It should be 1.2.11. glibc is known to have memory leaks and uninitialized data access in dlopen(), and xlib's XIM support (which we also use) is known to leak too...both leak even when the caller properly cleans up, as we do, and have had these issues reported by Valgrind for several years now without improvements from the original developers. For what it's worth, they aren't major leaks, but they aren't bugs in SDL. --ryan. Thanks for the quick response. Have these bugs been reported to glibc and xlib? |
There is a program called valgrind that checks other programs for memory-leaks. According to valgrind, the following program causes some memoryleaks between the two print statements: #include <stdio.h> #include <SDL/SDL.h> int main(int argc, char *argv[]) { fprintf(stderr, "BEFORE"); SDL_INIT(SDL_VIDEO | SDL_AUDIO); fprintf(stderr, "AFTER"); return 0; } I compiled it with "g++-4.1 Main.cpp -lSDL". I was curious if anyone else was having this issue. I'm running Ubuntu 7.04 with an ATI Mobility Radeon x1400. If there is any other information I can provide, please let me know. In case someone reading this hasn't heard of valgrind, there is a VERY brief (i.e. 30-second) tutorial at: http://valgrind.org/docs/manual/QuickStart.html Thank you in advance. Michael Buchoff