I have created an NSString with the retaining of FName property, and synthesized that property I have seen that the property has been defied Started on
My actual problem is, I have used [self.fName release], this sample is working fine, but static analysts count this error 'reference count of an object owned by the caller at this point Showing in the form of 'wrong shortage'.
Reference Code: There is no need to release you / nothing init if you are doing something like this: Then you have to leave yourself. FName. OfferLevel = NumberOffAloc as a rule of thumb number. And now, use the golden rule, ARC :) @ View Interface Viewer: UIViewController @property (nonatomic, retain) NSString * fName; @end @implementation ViewController @ synthetize fName; - (zero) viewDidoadload [[Super Viewedload]; // Setup an additional after loading the view, usually from a nibb. Self.fName = @ "Hello"; [Self.fName release]; // Analyzer ShÅzin error is here} --------- ------ End
self.fName = [[NSString alloc] InitWithString: @ "hello"];
No comments:
Post a Comment