• 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: ARC and dealloc
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ARC and dealloc


  • Subject: Re: ARC and dealloc
  • From: Jonny Yu <email@hidden>
  • Date: Thu, 08 Dec 2011 09:49:22 +0800

My understanding is, due to auto release semantics, your object might be auto released again during current pool draining. So it will be put into outer Autorelease Pool, that's to say the dealloc are not guaranteed to be executed at specific timing. ARC still relies on retain/release/autorelease, so it has the same behavior.If your code must unregister notification before something else. It's better to find a more deterministic timing.

Sent from my iPhone

On 2011-12-8, at 上午4:56, Mikkel Islay <email@hidden> wrote:

> Dear list,
>
> A question regarding the proper use of dealloc in ARC-environments (under iOS):
> I have a need to unregister NSNotification observers during exchange of UiViewControllers. Is implementing - (void)dealloc considered a proper use for this purpose? Is it safe to make assumptions regarding when in the release-process dealloc is called?
>
> Incidentally, the Apple List search tool appears not to work (i.e. returns no results).
>
> Thanks,
> Mikkel Islay
>
> _______________________________________________
>
> 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
_______________________________________________

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

References: 
 >ARC and dealloc (From: Mikkel Islay <email@hidden>)

  • Prev by Date: iOS: How to hide blue personal hotspot status bar?
  • Next by Date: bindings duplicates object returned
  • Previous by thread: ARC and dealloc
  • Next by thread: Re: ARC and dealloc
  • Index(es):
    • Date
    • Thread