The point is that the fetched 'Age' needs to be retained, or else it will
get autoreleased and dealloced. The global array takes care of that. The
solution appears to work OK, but maybe there is a more efficient way?
I believe this problem is covered in the KVO programming Guide, where it
"Note: The key-value observing addObserver:forKeyPath:options:context method
does not retain the observing object or the observed objects. You need to
review your application's requirements and manage retain and release for the
observing, and observed objects."
This looks not particularly enlightening to me, so I will file a
documentation enhancement request (in particular a piece of sample code
would do well).
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden