We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2680 - OSX: Replace NSAutoreleasePool with @autoreleasepool
Summary: OSX: Replace NSAutoreleasePool with @autoreleasepool
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: 2.0.3
Hardware: All Mac OS X (All)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-11 01:05 UTC by Tim McDaniel
Modified: 2014-08-17 22:07 UTC (History)
1 user (show)

See Also:


Attachments
patch (25.07 KB, patch)
2014-08-11 01:05 UTC, Tim McDaniel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim McDaniel 2014-08-11 01:05:33 UTC
Created attachment 1811 [details]
patch

This patch replaces all use of NSAutoreleasePool with the Apple recommended @autoreleasepool.  @autoreleasepool is supposedly more efficient, and since it is scope based it can't be accidentally not released.
Comment 1 Alex Szpakowski 2014-08-12 05:47:12 UTC
I agree with the suggestion, but I'm not sure about the indentation in the patch - it doesn't match SDL's code style.
Comment 2 Sam Lantinga 2014-08-17 22:07:58 UTC
We hadn't done this before because older XCode didn't support @autoreleasepool. We don't support older XCode anymore, so it's not an issue.

The patch looks good, thanks!
https://hg.libsdl.org/SDL/rev/eef2e43f60d1