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 2418 - Structure SDL_gestureTouch leaking
Summary: Structure SDL_gestureTouch leaking
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: HG 2.1
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-23 22:11 UTC by Leonardo
Modified: 2017-08-14 20:48 UTC (History)
2 users (show)

See Also:


Attachments
free SDL_gestureTouch vector (1.07 KB, patch)
2014-02-23 22:11 UTC, Leonardo
Details | Diff
patch (2.03 KB, text/plain)
2017-01-26 20:04 UTC, Sylvain
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leonardo 2014-02-23 22:11:33 UTC
Created attachment 1577 [details]
free SDL_gestureTouch vector

Structure SDL_gestureTouch gets reallocated for every new added gesture but its never freed.

Proposed patch add the function SDL_GestureQuit() that takes care of doing that and gets called when TouchQuit is called.
Comment 1 Gabriel Jacobo 2014-02-24 13:15:47 UTC
Thanks for the patch. I think it needs a bit of extra work though, looking at the code in SDL_gesture.c , I see that SDL_numGestureTouches only goes up, I think the right fix here involves adding SDL_GestureDelTouch (hooked into SDL_DelTouch) as well as SDL_GestureQuit (as you posted in your patch).
Comment 2 Sylvain 2017-01-26 20:04:12 UTC
Created attachment 2687 [details]
patch

Patch with the advised modifications !
Comment 3 Sam Lantinga 2017-08-14 20:48:34 UTC
Patch applied, thanks!
https://hg.libsdl.org/SDL/rev/ef96b05151c5