• 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
NSOutlineView: expanding an item retains it?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSOutlineView: expanding an item retains it?


  • Subject: NSOutlineView: expanding an item retains it?
  • From: Steve Mykytyn <email@hidden>
  • Date: Fri, 21 Jan 2005 21:44:55 -0800

Has anyone else run across this?

While dealing with a knotty retain problem in an NSDocument-based app I noticed that NSOutlineView appears to retain any expanded items.

This retain is not mentioned in the docs AFAIK, and I would not have noticed had I not introduced a very subtle bug of my own that caused me to look closely at the dealloc sequencing using MallocDebug. Should it be this way?

You can see the retain by closing an NSDocument whose main view has an NSOutlineView with some expanded items. While releasing all my document objects, I noticed that some didn't get dealloc until after the NSDocument was done with its dealloc. Using NSLog() to trace the output (heavily edited) looks like:

[NSDocument dealloc] ---> entered

... most of my data objects are receive dealloc immediately

[NSDocument dealloc] --->[super dealloc]
[NSDocument dealloc] ---> exited

(presumably the window gets released here, causing it to release its views)

[myMainView dealloc]

NSMutableArrays that corresponded to the top-level items in the NSOutlineView receive dealloc here, rather than above, IF the corresponding row in the NSOutlineView is expanded.

Although this SEEMS harmless, I wonder. Everything runs OK now in my app even if it gets dealloc a little late.

_______________________________________________
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


  • Follow-Ups:
    • Re: NSOutlineView: expanding an item retains it?
      • From: j o a r <email@hidden>
    • Re: NSOutlineView: expanding an item retains it?
      • From: Clark Cox <email@hidden>
  • Prev by Date: Re: Creating Cocoa Windows from Command Line Apps
  • Next by Date: Re: Authorization without permanent setuid on helper
  • Previous by thread: Re: What fonts are guaranteed to be on a user's machine?
  • Next by thread: Re: NSOutlineView: expanding an item retains it?
  • Index(es):
    • Date
    • Thread