| Summary: | double [release] error | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Vittorio Giovara <vitto.giova> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | iPhone/iPod touch | ||
| OS: | iOS (All) | ||
| Attachments: | fix the double free error | ||
This is fixed, thanks! http://hg.libsdl.org/SDL/rev/a69e36365766 |
Created attachment 521 [details] fix the double free error in SDL_uikitview the variable 'textfield' is initialialized and set to autorelease. however in the dealloc method a second [release] is sent. If the textfield has not been set to nil before (with a viewDidUnload for example) this can lead to awful hard-to-find crashes when the SDL code terminates. the error message is -[textfield release] message sent to deallocated instance 0x4e5fa90 the fix is simple, just release the object as soon as it is added to the subview, see attached patch