开发者

ASIFormDataRequest: delegate method call when delegate object release

I am using ASIFormDataRequest class to send and receive data from server to iphone client. I have a problem. For example, I have a View Controller using ASIFormDataRequest, if the current view is View Controller, the method requestFinished of ASIFormDataRequest delegate called successfully. But in some case, I pop back to the previous view of View Controller, that means the View Controller release, the ASIFormDataRequest object of View Controller class is also released. But the requestFinished still called. I debug and I see that View Controller has become a Zombie object, I don't know why the requestFinished method been called even object release. I also set in the dealloc method of ViewController

- (void) dealloc {
    a开发者_Python百科siFormDataRequest.delegate = nil;
    [super dealloc];
}


I think, better use your request not in this ViewController class, but create some independent class, and use from there you ASIRequests, using this class as delegate

btw, it helps me with similar situation

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜