CONTENTS
The
Code
.............................................................................................................................................................
269
Usage
..................................................................................................................................................................
270
8.4
Adding
Memory
Management
to
Your
Custom
Classes
............................
270
Problem
..............................................................................................................................................................
270
Solution
..............................................................................................................................................................
270
How
It
Works
......................................................................................................................................................
270
The
Code
.............................................................................................................................................................
273
Usage
..................................................................................................................................................................
274
8.5
Using
Autorelease
.....................................................................................
275
Problem
..............................................................................................................................................................
275
Solution
..............................................................................................................................................................
275
How
It
Works
......................................................................................................................................................
275
The
Code
.............................................................................................................................................................
277
Usage
..................................................................................................................................................................
280
8.6
Enabling
Garbage
Collection
for
Mac
Applications
...................................
280
Problem
..............................................................................................................................................................
280
Solution
..............................................................................................................................................................
280
How
It
Works
......................................................................................................................................................
281
Chapter
9:
Working
With
Object
Graphs
......................................................
283
Object-Orientated
Vocabulary
.........................................................................
283
Entity
.................................................................................................................................................................
283
Class .................................................................................................................................................................
284
Objects .............................................................................................................................................................
284
The Object Graph ..........................................................................................................................................
284
9.1
Creating
an
Object
Graph
..........................................................................
285
Problem
..............................................................................................................................................................
285
Solution
..............................................................................................................................................................
285
How It Works ..................................................................................................................................................
285
The
Code
.............................................................................................................................................................
292
Usage
..................................................................................................................................................................
296
9.2
Using
Key-Value
Coding
............................................................................
297
Problem
..............................................................................................................................................................
297
Solution
..............................................................................................................................................................
297
How
It
Works
......................................................................................................................................................
297
The
Code
.............................................................................................................................................................
300
Usage
..................................................................................................................................................................
304
9.3
Using
Key
Paths
in
Your
Object
Graph
Problem
••••••••••••••••••••••••••••••••••••••••
305
Solution
..............................................................................................................................................................
305
How
It
Works
......................................................................................................................................................
305
The
Code
.............................................................................................................................................................
306
Usage
..................................................................................................................................................................
310
xvi
CONTENTS
The
Code
.............................................................................................................................................................
269
Usage
..................................................................................................................................................................
270
8.4
Adding
Memory
Management
to
Your
Custom
Classes
............................
270
Problem
..............................................................................................................................................................
270
Solution
..............................................................................................................................................................
270
How
It
Works
......................................................................................................................................................
270
The
Code
.............................................................................................................................................................
273
Usage
..................................................................................................................................................................
274
8.5
Using
Autorelease
.....................................................................................
275
Problem
..............................................................................................................................................................
275
Solution
..............................................................................................................................................................
275
How
It
Works
......................................................................................................................................................
275
The
Code
.............................................................................................................................................................
277
Usage
..................................................................................................................................................................
280
8.6
Enabling
Garbage
Collection
for
Mac
Applications
...................................
280
Problem
..............................................................................................................................................................
280
Solution
..............................................................................................................................................................
280
How
It
Works
......................................................................................................................................................
281
Chapter
9:
Working
With
Object
Graphs
......................................................
283
Object-Orientated
Vocabulary
.........................................................................
283
Entity
.................................................................................................................................................................
283
Class .................................................................................................................................................................
284
Objects .............................................................................................................................................................
284
The Object Graph ..........................................................................................................................................
284
9.1
Creating
an
Object
Graph
..........................................................................
285
Problem
..............................................................................................................................................................
285
Solution
..............................................................................................................................................................
285
How It Works ..................................................................................................................................................
285
The
Code
.............................................................................................................................................................
292
Usage
..................................................................................................................................................................
296
9.2
Using
Key-Value
Coding
............................................................................
297
Problem
..............................................................................................................................................................
297
Solution
..............................................................................................................................................................
297
How
It
Works
......................................................................................................................................................
297
The
Code
.............................................................................................................................................................
300
Usage
..................................................................................................................................................................
304
9.3
Using
Key
Paths
in
Your
Object
Graph
Problem
••••••••••••••••••••••••••••••••••••••••
305
Solution
..............................................................................................................................................................
305
How
It
Works
......................................................................................................................................................
305
The
Code
.............................................................................................................................................................
306
Usage
..................................................................................................................................................................
310
xvi