[swift-users] Autoreleasepool for Ubuntu
Jens Alfke
jens at mooseyard.com
Wed Nov 2 15:45:55 CDT 2016
> On Nov 2, 2016, at 1:42 PM, Bernardo Breder via swift-users <swift-users at swift.org> wrote:
>
> The algorithm that i send is a example of server code and this code will execute in a ubuntu environment. When i install in the ubuntu, the swiftc show me that the autoreleasepool is "use of unresolved identifier 'autoreleasepool'". I want to clean the memory all the time when a client close.
You don’t need to on Ubuntu. Autorelease pools are only to clean up Objective-C object references. Those don’t exist when you’re not running on an Apple platform; you only have Swift objects.
That SO question you linked to is talking about code running on macOS or iOS. It doesn’t apply to other platforms.
—Jens
More information about the swift-users
mailing list