Title: Theory / Important / CS / Programming / Objective-C / Documentation / Initialization
On every note of this deck, unless a note says otherwise:
Page: https://developer.apple.com/library/archive/documentation/General/Conceptual/CocoaEncyclopedia/ObjectAllocation/ObjectAllocation.html

Name: A zone
Definition: A page-aligned area of memory for holding related objects and data allocated by an application
Page: https://developer.apple.com/library/archive/documentation/General/Conceptual/CocoaEncyclopedia/ObjectAllocation/ObjectAllocation.html
Context: Objective C

Question: What should allocation for Cl do
Answer: Allocate enough memory in a zone to holds all instances of this class
Variables: Cl a class
Context: Objective C
Answer2: sets the object's retain count to one
Answer3: initialize the object's `isa` instance
Answer4: Initializes all other instance variables to zero

Question: What should `init` do if initialization is impossible
Answer: Release the newly allocated object (in memory-managed code)
Variables: Cl a class
Context: Objective C
Answer2: return nil

Question: How to implement an initializer
Answer: Always invoke the superclass (super) initializer first.
Variables: Cl a class
Context: Objective C
Answer2: Check the object returned by the superclass. If it is nil, then initialization cannot proceed; return nil to the receiver.
Answer3: When initializing instance variables that are references to objects, retain or copy the object as necessary (in memory-managed code).
Answer4: Return the value, or nil if impossible to create

Question: What should a secondary initializer call first
Answer: the primary initializer on self
Variables: Cl a class
Context: Objective C

Question: What should a primany initializer call first
Answer: the primary initializer of super
Variables: Cl a class
Context: Objective C

Name: The primary initializer of Cl
Definition: An initializer of Cl that don't call another initializer on self (but call one on super)
Page: https://developer.apple.com/library/archive/documentation/General/Conceptual/CocoaEncyclopedia/ObjectAllocation/ObjectAllocation.html
Variables: Cl a class
Context: Objective C
Cardinal: At most one

Name: A secondary initializer of Cl
Definition: An initializer that call [self init...] with another initializer
Page: https://developer.apple.com/library/archive/documentation/General/Conceptual/CocoaEncyclopedia/ObjectAllocation/ObjectAllocation.html
Variables: Cl a class
Context: Objective C