Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. COI agree that it simply depends upon what was in Devfly's `viewDidUnload`, but I'd be shocked if there's anything that needs to move to `dealloc` as a result of iOS 6. Generally, when we use a view controller and then dismiss/pop it, `viewDidUnload` is never called (it's only used in low memory situations), so hopefully there's no routine cleanup in `viewDidUnload` that they're not also cleaning up in `dealloc`! If anyone is doing this sort of stuff in `viewDidUnload` in lieu of `dealloc`, then they have bigger problems on their hands.
      singulars
    2. COYou are right Rob. I think you use dealloc to remove the observers? I know iOS 6.0 automatically releases viewcontroller's memory image once it has been unloaded but if I want to perform some operation just before my view controller deallocated. For example call unsubscribe method of communication manager so that it decrement it's observers count by one. so what I do in iOS 6.0 is, subscribe observers in intiWithCoder and unsubscribe in dealloc. Is that bad design?
      singulars
    3. COThis is all unrelated to this post, but in that other discussion you reference, the OP clearly didn't understand the purpose of `viewDidUnload`. But in answer to your question, yes, you can this sort of stuff in `dealloc`, but `viewWillDisappear` is probably better. Most importantly, if your communication manager maintains a strong reference to your view controller, then you absolutely should not try to unsubscribe in `dealloc` (because you'll have a strong reference cycle; `dealloc` will never be called). That sort of stuff must be done elsewhere, e.g. `viewWillDisappear`.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload