Auto-Release Pools w/ try (Cocoa)
The standard Java try statement has been extended for the Cocoa platform to allow the __autoreleasepool keyword to be used in lieu of another expression. This creates a new Auto-Release Pool for this thread and cleans it up at the end of the try statement.
try (__autoreleasepool) {
NSApplicationMain(argc, argv);
}
Refer to the Auto-Release Pool topic in the Cocoa platform section for more details.
Cocoa Only
The using __autoreleasepool syntax is relevant and available on the Cocoa platform only.
See Also
- Auto-Release Pool
- Automatic Reference Counting (ARC)
usingstatement in Oxygene