最近在改接手維護的專案時遇到了一個問題:

當我在 dealloc 方法中呼叫 [super dealloc],
Xcode 就丟了一段話出來:ARC forbids explicit message send of ‘dealloc’ 。

後來看了一下官方文件
才發現原來 dealloc 在ARC下不需要我們自己呼叫 [super dealloc]

Custom dealloc methods in ARC do not require a call to [super dealloc] (it actually results in a compiler error). The chaining to super is automated and enforced by the compiler.

編譯器會自動處理這件事,所以就不用我們操心摟!

不過還是要記得只要是繼承(擴展)父類別的方法一定要呼叫 [super xxx] 喔!
dealloc 就當作例外特別記住摟~