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

Summary: OSX: Replace NSAutoreleasePool with @autoreleasepool
Product: SDL Reporter: Tim McDaniel <tmcdaniel>
Component: *don't know*Assignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: amaranth72
Version: 2.0.3   
Hardware: All   
OS: Mac OS X (All)   
Attachments: patch

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