Why is Klang complaining about all my auto-realized objects?

I have the following function:

- (NSString *)urlEncodedValue {
NSString *result = (NSString *)CFURLCreateStringByAddingPercentEscapes(
                   kCFAllocatorDefault, 
                   (CFStringRef)self, 
                   NULL, 
                   CFSTR("?=&+/\r\n"), 
                   kCFStringEncodingUTF8
);

return [result autorelease];

}

Why is Klang giving me the following complaints?

  • 1 A call to the function "CFURLCreateStringByAddingPercentEscapes" returns a Core Foundation object with a check digit of +1 (owning the link)
  • 2 sent message - automatic message
  • 3 Object returned to the caller as a reference to the owner (single save account transferred to the caller)
  • 4 Object over-autoreleased: the object was sent -autorelease, but the object has a zero (locally visible) save

, Apple . ? 19 , . ?

+3
1

, , - . checker-0.198, checker-0.204 . , .

+3

Source: https://habr.com/ru/post/1708027/


All Articles