Re: Outline View not retaining objects it uses. Why?
Re: Outline View not retaining objects it uses. Why?
- Subject: Re: Outline View not retaining objects it uses. Why?
- From: email@hidden
- Date: Sun, 20 Jul 2008 05:59:13 -0400
On Jul 20, 2008, at 5:25 AM, Paul Sargent wrote:
wasn't really expecting the view to keep a cache at all. I was
expecting it to request the item each time it wanted information
about it (in which case an returning an autoreleased object seemed
reasonable).
It may not have been your intention, but you are expecting it to cache
your objects. You created a dictionary and returned it to the view
and did not maintain ownership of the object yourself. Then, in
outlineView:objectValueForTableColumn:byItem:, you retrieved values
from that dictionary and you relied on the view to return a reference
to that object, and you even stated you thought the view would retain
the object. So, effectively, you expected the view to cache it.
Aaron
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden