Can using __weak attribute to pass parameter to blocks lead to memory leaks?
问题 In my iOS ARC-enabled code, I need to pass "self" and other objects to a block. More specifically, I need to interact with self and an ASIHTTPRequest object inside the ASIHTTPRequest 's completionBlock . _operation = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(parseServerReply) object:nil]; _request = [ASIHTTPRequest requestWithURL:@"server.address"]; // ... [_request setCompletionBlock:^{ [self setResponseString:_request.responseString]; [[MyAppDelegate getQueue]