Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing observers in post-ARC Cocoa

So far I have been removing observers (notifications or KVO) in the dealloc. Since dealloc is gone in ARC, what's the recommended way to do this?

like image 862
cfischer Avatar asked Dec 03 '22 06:12

cfischer


1 Answers

-dealloc is not gone under ARC. The ivar-releasing and super-calling aspects are handled automatically, allowing you to omit it if that's all you were going to do, but you should still implement it for other things if it makes sense to do so.

like image 75
Catfish_Man Avatar answered Dec 30 '22 09:12

Catfish_Man