Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

double [release] error #296

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

double [release] error #296

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 2.0
Reported for operating system, platform: iOS (All), iPhone/iPod touch

Comments on the original bug report:

On 2010-07-17 19:21:36 +0000, Vittorio Giovara wrote:

Created attachment 521
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

On 2011-01-19 23:46:00 +0000, Sam Lantinga wrote:

This is fixed, thanks!
http://hg.libsdl.org/SDL/rev/a69e36365766

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant