Notification Issue
Notification Issue
- Subject: Notification Issue
- From: John Nairn <email@hidden>
- Date: Thu, 11 Sep 2003 12:23:17 -0600
My application has two types of documents and one type needs to know if
the other one has just closed. I implemented the process by posting a
notification in the dealloc method of the second document type with
object self.
But then I noticed in Apple documentation on posting notification that:
notificationWithName:object:
+ (id) notificationWithName: (NSString *) aName object: (id) anObject
Returns a notification object that associates the name aName with the
object anObject .aName may not be nil .
This method copies aName and retains anObject .
My concern is that self (passed as anObject) will be retained while
being deallocated. It seems to work fine, but is such a notification
posting in delloc method forbidden?
------------
John Nairn (1-801-581-3413, FAX: 1-801-581-4816)
Web page:
http://www.eng.utah.edu/~nairn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.