Created
October 10, 2013 08:58
-
-
Save satoshin2071/6915271 to your computer and use it in GitHub Desktop.
[メモ] blocksでselfを使うとき
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//weakだと、blokcksに入って、叩くまでの間に開放され得るらしく、叩く場合は、strongに代入 | |
__weak Hoge *weakSelf = self; | |
blocks = ^(void) | |
{ | |
__strong Hoge *strongSelf = weakSelf; | |
[strongSelf hogeWithHoge:4126] | |
strongSelf = nil; | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment