| Summary: | SDL_TouchQuit, SDL_DelTouch leaks memory | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Alexander Hirsch <1zeeky> |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | minor | ||
| Priority: | P1 | CC: | 1zeeky, jorgen |
| Version: | HG 2.0 | Keywords: | target-2.0.0 |
| Hardware: | All | ||
| OS: | All | ||
| Bug Depends on: | 1580 | ||
| Bug Blocks: | |||
| Attachments: | this patch fixes both leaks | ||
Also, this bug does not really depend on Bug #1580, but without the fix it will crash (or invoke undefined behavior), which given the current incorrect implementation did not happen before. (Sorry if you get a lot of copies of this email, we're touching dozens of bug reports right now.) Tagging a bunch of bugs as target-2.0.0, Priority 1. This means we're in the final stretch for an official SDL 2.0.0 release! These are the bugs we really want to fix before shipping if humanly possible. That being said, we don't promise to fix them because of this tag, we just want to make sure we don't forget to deal with them before we bless a final 2.0.0 release, and generally be organized about what we're aiming to ship. Hopefully you'll hear more about this bug soon. If you have more information (including "this got fixed at some point, nevermind"), we would love to have you come add more information to the bug report when you have a moment. Thanks! --ryan. Fixed in http://hg.libsdl.org/SDL/rev/7833f01322b3 by Sam. |
Created attachment 937 [details] this patch fixes both leaks SDL_TouchQuit calls SDL_DelTouch with an index instead of an id. This causes it not to free all SDL_Touch-es. Further more, SDL_DelTouch does not free its fingers. The attached patch implements SDL_DelTouchByIndex, SDL_DelFingerByIndex, fixes the loop in SDL_TouchQuit that would skip index 0 and adds one for SDL_DelTouch to call SDL_DelFingerByIndex on all of the SDL_Touch-es finger-indices.