Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
NSObject クラスを作成する場合、init メソッドと dealloc メソッドを明示的に作成する必要がありますか、それらのデフォルト メソッドはありますか。init メソッドを記述しないとメモリ リークが発生することがわかりました。
initクラスのorメソッドを記述しない場合deallocは、継承されたスーパー クラスの and がありますinit。 オブジェクト メンバーにメモリを割り当てていない限り、メモリ リークは発生しません。dealloc
init
dealloc