Re: NSTask and NSPipe
Re: NSTask and NSPipe
- Subject: Re: NSTask and NSPipe
- From: Fritz Anderson <email@hidden>
- Date: Wed, 27 Jun 2001 04:02:44 -0500
Oops...
One more trick:
(5) See the documentation for -[NSNotificationCenter
addObserver:selector:name:object:] :
"The notification center does not retain anObserver or anObject.
Therefore, you should always send -removeObserver: or
removeObserver:name:object: to the notification center before
releasing these objects."
So stop observation of NSTaskDidTerminateNotification in endMyTask:,
and of NSFileHandleReadCompletionNotification when dataAvailable: is
exhausted.
-- F