• 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: NSDocument, NSManagedObjectContext do Stuff in -dealloc, Cause Crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocument, NSManagedObjectContext do Stuff in -dealloc, Cause Crash


  • Subject: Re: NSDocument, NSManagedObjectContext do Stuff in -dealloc, Cause Crash
  • From: Oftenwrong Soong <email@hidden>
  • Date: Thu, 31 Dec 2009 10:36:09 -0800 (PST)

Hi all,

If it is true that the ONLY safe thing you can do in dealloc is release instance variables, then where else/how else are you supposed to implement a method that is guaranteed to be called upon an object's termination, so that you can do final cleanups, such as removing it as an observer or closing external resources such as files or network connections? Jerry isn't the only one who needs to do such cleanups, nor am I.

Thanks,
Soong



----- Original Message ----
From: Jerry Krinock <email@hidden>
To: Cocoa Developers <email@hidden>
Sent: Thu, December 31, 2009 9:36:47 AM
Subject: NSDocument, NSManagedObjectContext do Stuff in -dealloc, Cause Crash

<snip>

Is this a good case study in why "the only safe thing to do in your dealloc method is to release instance variables", or have I misunderstood the problem?


<snip>




_______________________________________________

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

  • Follow-Ups:
    • Re: NSDocument, NSManagedObjectContext do Stuff in -dealloc, Cause Crash
      • From: Quincey Morris <email@hidden>
References: 
 >NSDocument, NSManagedObjectContext do Stuff in -dealloc, Cause Crash (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Setting the Line Height/ Line Spacing in an NSTextView.
  • Next by Date: Re: NSDocument, NSManagedObjectContext do Stuff in -dealloc, Cause Crash
  • Previous by thread: NSDocument, NSManagedObjectContext do Stuff in -dealloc, Cause Crash
  • Next by thread: Re: NSDocument, NSManagedObjectContext do Stuff in -dealloc, Cause Crash
  • Index(es):
    • Date
    • Thread