Skip to content

Commit

Permalink
init 和 dealloc 第二部分
Browse files Browse the repository at this point in the history
Signed-off-by: 庞博 <[email protected]>
  • Loading branch information
庞博 committed Apr 30, 2015
1 parent 6da5898 commit b08e500
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion translation/5-类.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The recommended way to organize the code is to have `dealloc` method placed at

In these days with ARC, it is less likely that you will need to implement the dealloc method, but still the rationale is that by having the dealloc very close to your init methods, you are visually emphasizing the pairing between the methods. Usually in the dealloc method you will undo things that you have done in the init methods.

如今有了 ARC,你几乎不需要实现 dealloc 方法,但是关于dealloc的基本原理和 init 方法很像。你应该在方法中进行显示地强调,同时在 dealloc 中,你需要取消执行在 init 方法做的事情
如今有了 ARC,dealloc 方法几乎不需要实现,不过把 init dealloc 放在一起可以从视觉上强调它们是一对的。通常,在 init 方法中做的事情需要在 dealloc 方法中撤销


`init` methods should be structured like this:
Expand Down

0 comments on commit b08e500

Please sign in to comment.