Re: message to zombie NSWindowController
Re: message to zombie NSWindowController
- Subject: Re: message to zombie NSWindowController
- From: James Walker <email@hidden>
- Date: Tue, 17 Nov 2009 13:30:30 -0800
James Walker wrote:
When running on Tiger, my NSWindowController subclass that runs a modal
preferences dialog gets a retain message after it has been deallocated.
I can't reproduce this on Snow Leopard. The backtrace starts:
#0 0x92cc5fb8 in -[_NSZombie retain] ()
#1 0x92c2f1cc in -[NSInvocation retainArguments] ()
#2 0x93c5bc70 in _NSSendCommitEditingSelector ()
#3 0x93c7f1ec in -[NSController
_controllerEditor:didCommit:contextInfo:] ()
#4 0x90a461f4 in objc_msgSendv ()
#5 0x92bf3fcc in -[NSInvocation invoke] ()
#6 0x92bf457c in -[NSInvocation invokeWithTarget:] ()
#7 0x92c02f38 in __NSFireDelayedPerform ()
#8 0x907f2384 in __CFRunLoopDoTimer ()
Items #2 and #3 make me think this might have something to do with the
NSEditor protocol, but I don't understand how. As far as I can tell, I
don't have any objects that conform to that protocol... no NSDocument,
no NSObjectController, etc.
OK, I was wrong about this, I do use NSUserDefaultsController, which is
a subclass of NSController. Apparently, when my OK button handler calls
[mUserDefController save: self], that calls -[NSObject
performSelector:withObject:afterDelay:inModes:], resulting in the zombie
call. I still don't understand why the user defaults controller would
want to retain the window controller.
--
James W. Walker, Innoventive Software LLC
<http://www.frameforge3d.com/>
_______________________________________________
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