_request = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:url]];
[_request setPostValue:emailFiled.text forKey:@"Mail"];
[_request setPostValue:accountFiled.text forKey:@"UserAccount"];//帐户
[_request setPostValue:[self md5:passwordFiled.text] forKey:@"PassWord"];//密码
[_request setTimeOutSeconds:10];
[_request setDelegate:nil];
[_request startAsynchronous];
[_request setCompletionBlock:^{}];
- (void)dealloc{
[_request clearDelegatesAndCancel];
[_request release];
[super dealloc];
}
更改ViewController时,需要覆盖dealloc方法吗?
答案 0 :(得分:0)
如果您使用ARC,我认为您应该实现dealloc功能。在此功能中,您:
将委托分配给nil
删除观察者
如果您不使用ARC,则必须实现dealloc函数以释放ivar变量。