Objective C alloc/release error

后端 未结 4 1857
庸人自扰
庸人自扰 2020-12-07 06:19

I have the following problem:

in header;

GDataXMLDocument *doc;
NSString *xmlBody;
@property (nonatomic,copy) NSString *xmlBody;
@property (nonatomic         


        
4条回答
  •  天涯浪人
    2020-12-07 07:01

    If you want to release an ivar/property(retain), this is not how to to it:

    [self.doc release];
    

    instead:

    self.doc = nil;
    

提交回复
热议问题