Skip to content

Instantly share code, notes, and snippets.

@satoshin2071
Created October 10, 2013 08:58
Show Gist options
  • Save satoshin2071/6915271 to your computer and use it in GitHub Desktop.
Save satoshin2071/6915271 to your computer and use it in GitHub Desktop.
[メモ] blocksでselfを使うとき
//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