Cocoa Internals/Memory Management

From Free Pascal wiki
Revision as of 21:55, 24 December 2017 by Skalogryz (talk | contribs) (→‎See Also)
Jump to navigationJump to search

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