• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTask outliving parent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: Cocoa-dev Digest, Vol 2, Issue 302 (From: Chad Armstrong <email@hidden>)

  • Prev by Date: Re: How to make key shortcuts and mouse click trigger controlTextDidEndEditing:
  • Next by Date: Re: Adding a category to a protocol
  • Previous by thread: Re: Cocoa-dev Digest, Vol 2, Issue 302
  • Next by thread: Adding a category to a protocol
  • Index(es):
    • Date
    • Thread