Re: NSTask outliving parent
Re: NSTask outliving parent
- Subject: Re: NSTask outliving parent
- From: j o a r <email@hidden>
- Date: Sun, 6 Mar 2005 10:46:45 +0100
On 2005-03-06, at 06.15, Chad Armstrong wrote:
Perhaps you could make a call like [mytask terminate]; within the
parent applications dealloc method. That might work.
I think that there are several reasons why that wouldn't work:
1) What is "the parent applications dealloc method"? On the conceptual
level I'm not quite sure what that would be. Most apps have some sort
of MainController / AppController object, but this is typically a
singleton object, and they are usually never released. Let's say that
you're talking about the object that "owns" the task, in that case you
would bump into the fact that:
2) Even during a controlled termination of a Cocoa application, the
dealloc methods are typically skipped. The list archives have lots of
info on that topic, and there is some in the docs.
3) When an application is force quit, anything you'd usually do during
a controlled termination will definitively be skipped. Writing a signal
handler to perform a somewhat controlled termination for such
situations would be very, very, difficult.
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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