Cocoa Internals/Memory Management
From Free Pascal wiki
All Objective-C objects are reference counted objects. Once the count reaches zero - the object is freed.
The modern Objective-C (or Swift) recommends (strongly, fiercely) to use Automatic-Reference-Counting (ARC) support. FPC support for Objective-C was started way before ARC became highly recommended and was part of the language. Right now Objective-C 2.0 syntax provides the language level support for ARC, while FPC doesn't have those (yet?). All Cocoa Widgetset code cannot doesn't rely on ARC and using reference and dereference manually.
See Also
- Cocoa Internals
- Advanced Memory Management - at Apple Developer