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 1219 - Memory Leak at SDL_DestroyRenderer in opengl mode
Summary: Memory Leak at SDL_DestroyRenderer in opengl mode
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-09 00:39 UTC by Dimitris Zenios
Modified: 2011-07-16 14:59 UTC (History)
1 user (show)

See Also:


Attachments
Patch to fix leak (868 bytes, patch)
2011-06-09 00:39 UTC, Dimitris Zenios
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitris Zenios 2011-06-09 00:39:19 UTC
Created attachment 618 [details]
Patch to fix leak

There is a memory leak of GL_ShaderContext when SDL_DestroyRenderer is called in opengl mode.


==22655== 168 bytes in 1 blocks are definitely lost in loss record 79 of 144
==22655==    at 0x4026D34: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22655==    by 0x4EA0EFC: GL_CreateShaderContext (SDL_shaders_gl.c:274)
==22655==    by 0x4EA0370: GL_CreateRenderer (SDL_render_gl.c:331)
==22655==    by 0x4E9B23F: SDL_CreateRenderer (SDL_render.c:166)
==22655==    by 0x401438: main (main.c:85)

Attached patch fixes this issue
Comment 1 Ryan C. Gordon 2011-07-16 14:59:53 UTC
This is fixed in hg changeset 0d221d6ffac8, thanks!

--ryan.