Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__block variables have been capture by the block,but 'dispose_helper' error #33

Open
zjutwhw opened this issue Jun 13, 2017 · 1 comment

Comments

@zjutwhw
Copy link

zjutwhw commented Jun 13, 2017

__block variables have been capture by the block,but 'dispose_helper' error , Demo:

__weak CDItem *item = [CDItem new];
__block NSInteger index = 10;
void (^callblock)(NSString *name) = ^(NSString *name){
item.name = name;
index = 20;
};
callblock(@"jack");
void *block = (__bridge void *)callblock;
NSIndexSet *set = GetBlockStrongLayout(block); // FBBlockStrongLayout中_GetBlockStrongLayout(...)实现

error:
dispose_helper -- Thread 1: EXC_BAD_ACCESS (code=1, address=0x10)

@zjutwhw zjutwhw changed the title __block 标识的变量,在Block中,dispose_helper发生Thread 1: EXC_BAD_ACCESS (code=1, address=0x10) __block variables have been capture by the block,but 'dispose_helper' error Jun 13, 2017
@zjutwhw
Copy link
Author

zjutwhw commented Jun 19, 2017

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant