On 16/06/2009, at 4:00 PM, Ken Thomases wrote:

Actually, I believe a data source has stricter requirements on it than merely following the memory management rules.

From <http://developer.apple.com/documentation/Cocoa/Conceptual/OutlineView/Articles/UsingOutlineDataSource.html#//apple_ref/doc/uid/20000725-140686 >:

Ah, OK, this is trickier than I thought. Thanks for the correction.

I think there's no getting away from the need for the data source to maintain all of the objects it vends. It can allocate them lazily, on demand. The object can be owned by the C++ object, or there can be a mapping from each C++ object to the corresponding Objective-C object, or you can maintain an Objective-C data structure that parallels the C++ data structure.

Yes - I imagined you could probably create an autoreleased wrapper on the fly for each item requested by the outline view, but it looks like it's not going to work, more's the pity.

--Graham


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to