The following helper method, singleton class (SharedManager), can trigger a save loop. Getting warnings in the static analyzer: "Potential leak of the object highlighted in the string ..." How can I fix it?
I tried to do ivar uuid __weak, but a warning still appears during parsing.
NSString *__weak uuid = (__bridge NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuidObject);
thanks
Called in a class as follows:
myUUID = [SharedManager generateUUID]; + (NSString *)generateUUID { CFUUIDRef uuidObject = CFUUIDCreate(kCFAllocatorDefault); NSString *uuid = (__bridge NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuidObject); CFRelease(uuidObject); return uuid; }
source share