Difference between revisions of "Cocoa Internals/Memory Management"

From Free Pascal wiki
Jump to navigationJump to search
Line 6: Line 6:
 
==See Also==
 
==See Also==
 
*[[Cocoa Internals]]
 
*[[Cocoa Internals]]
 +
*[https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/MemoryMgmt.html Advanced Memory Management] - at Apple Developer
 
[[Category:Cocoa]]
 
[[Category:Cocoa]]

Revision as of 21:55, 24 December 2017

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