Custom dealloc using ARC

原创文章,转载请注明来源并保留原文链接

When using ARC, you simply do not call super’s dealloc explicitly – it is handled for you (as described in the Clang LLVM ARC document, chapter 7.1.2)

- (void) dealloc
{
    [dataModel unregisterObject:self];
    // [super dealloc]; << provided by the compiler
}

Leave a Reply

Your email address will not be published. Required fields are marked *