| Summary: | avoid allocating nsstring from char* | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Vittorio Giovara <vitto.giova> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | minor | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | Mac OS X (All) | ||
| Attachments: | Patch avoiding leaks | ||
Looks good, thanks! http://hg.libsdl.org/SDL/rev/146d1d7ecdc4 |
Created attachment 988 [details] Patch avoiding leaks Changesets 4f272256d172 and 42214b6959c5 introduce two neat features for logging and alertbox on ios and osx. However the NSString allocated (and a few other objects) are not freed by the autorelease pool when created by +alloc and -initWithStuff: and this will create leaks. While negligible on osx, on mobile it's better not to have leaks. Attached is a patch that should take care of the problems on both platforms. Please make sure the features still work as intended.