NSAutoreleasePool

E236688

NSAutoreleasePool is an Objective-C Foundation class that manages the deferred release of objects in manual reference-counted memory management.

All labels observed (1)

Label Occurrences
NSAutoreleasePool canonical 1

How this entity was disambiguated

Statements (44)

Predicate Object
instanceOf Foundation framework class
Objective-C class
bestPractice use @autoreleasepool instead in modern code
category memory management class
definedInLanguage Objective-C
documentationURL https://developer.apple.com/documentation/foundation/nsautoreleasepool
effectOfDraining sends release to contained autoreleased objects
effectOfReleasingPool equivalent to draining pool
introducedFor Objective-C Cocoa memory management
keyMethod -addObject:
-drain
-release
lifecycleOperation alloc
drain
init
release
memoryManagementModel manual reference counting
memoryPattern helps control peak memory usage in loops
ownedBy Apple Inc.
partOfFramework Foundation
platform macOS Cocoa
surface form: Apple Cocoa

Cocoa Touch
primaryRole defer object deallocation
manage autoreleased objects
relatedConcept NSApplication main event loop
NSAutoreleasePool stack
NSRunLoop
autorelease
runsOn iOS
macOS
tvOS
watchOS
scope Objective-C runtime
statusUnderARC largely unnecessary
replaced by @autoreleasepool blocks
supersededBy @autoreleasepool
Automatic Reference Counting
threadingBehavior pools are per-thread
threadingRequirement each thread should create its own autorelease pool
usagePattern created at start of event loop iteration
drained at end of event loop iteration
used to bound temporary object lifetimes
usedIn pre-ARC Objective-C codebases
usedWith retain-release memory management

How these facts were elicited

Referenced by (1)

Full triples — surface form annotated when it differs from this entity's canonical label.

NeXTSTEP Foundation Kit defines NSAutoreleasePool