NSOutlineView: expanding an item retains it?
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