【发布时间】:2011-01-28 07:48:42
【问题描述】:
这是另一个新手问题。
我想从外部类调用 ASIHTTPRequest(因为我已经在我的主类中使用了它)并且我做了这样的事情:
ASIHTTPNSFabExt *nRequest = [[ASIHTTPNSFabExt alloc]init];
nRequest.URL = @"http://something";
nRequest.var1 = [dictionaryRecord objectForKey:@"something"];
nRequest.var2 = [dictionaryRecord objectForKey:@"something"];
[nRequest saveComment];
saveComment 方法执行 ASIHTTPRequest 任务的地方。
一切正常,除非我尝试在我的主类中执行 [nRequest release],这将在 ASIHTTPRequest 方法中生成错误。
Retain Count before my release is 1 并且 autorelease 也不起作用:我确定我缺少一些内存管理基础知识,但您能帮我寻找正确的操作方法吗?
提前感谢
法布里齐奥
【问题讨论】:
标签: ios release asihttprequest