• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSOutlineView: expanding an item retains it?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOutlineView: expanding an item retains it?


  • Subject: Re: NSOutlineView: expanding an item retains it?
  • From: Steven Kramer <email@hidden>
  • Date: Mon, 24 Jan 2005 20:40:16 +0100


Op 24-jan-05 om 12:08 heeft j o a r het volgende geschreven:


On 2005-01-24, at 10.57, Charlton Wilbur wrote:

I don't think retaining implies ownership strictly. Container classes may not own the objects stored in them, after all. Retaining implies "I have an interest in this object, and I don't want it going away until I've made it clear that I'm done with it."

I guess it comes down to what "ownership" means. I'm not too happy about introducing that word in this discussion, as it's ambiguous, but I guess it's too late to change that now...


But back to the topic of this thread: Why should an NSOutlineView retain an item provided by the data source? The data source must in my opinion be responsible for retaining all objects that it contains for as long as they are valid (ie. until reloadData are next called). So what would be the point of having the outline view also retaining them? To be able to use them after reloadData is called? Doesn't make much sense, right?

I might be able to come up with a few reasons, and all of them would probably be related to optimizations of the implementation of NSOutlineView. And like you said, such implementation detail should not matter to the application programmer. I've long stopped checking retain counts of objects passed to Cocoa frameworks for all but the hairiest memory leak situations, so I'd like to conclude by agreeing with you ;-)


Regards,

Steven Kramer

--
email@hidden
http://sprintteam.com/

_______________________________________________
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


References: 
 >NSOutlineView: expanding an item retains it? (From: Steve Mykytyn <email@hidden>)
 >Re: NSOutlineView: expanding an item retains it? (From: j o a r <email@hidden>)
 >Re: NSOutlineView: expanding an item retains it? (From: daniel <email@hidden>)
 >Re: NSOutlineView: expanding an item retains it? (From: Steven Kramer <email@hidden>)
 >Re: NSOutlineView: expanding an item retains it? (From: Charlton Wilbur <email@hidden>)
 >Re: NSOutlineView: expanding an item retains it? (From: j o a r <email@hidden>)

  • Prev by Date: Changing the language at runtime
  • Next by Date: RE: Getting the rect of a character in an NSTextView
  • Previous by thread: Re: NSOutlineView: expanding an item retains it?
  • Next by thread: Re: NSOutlineView: expanding an item retains it?
  • Index(es):
    • Date
    • Thread