| Summary: | Structure SDL_gestureTouch leaking | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Leonardo <leonardo.guilherme> |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | gabomdq, sylvain.becker |
| Version: | HG 2.1 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: |
free SDL_gestureTouch vector
patch |
||
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). Created attachment 2687 [details]
patch
Patch with the advised modifications !
Patch applied, thanks! https://hg.libsdl.org/SDL/rev/ef96b05151c5 |
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.