kishikawakatsumi / UICKeyChainStore

UICKeyChainStore is a simple wrapper for Keychain on iOS, watchOS, tvOS and macOS. Makes using Keychain APIs as easy as NSUserDefaults.
http://kishikawakatsumi.com
MIT License
3.08k stars 383 forks source link

Transfer ownership of returned CF objects to avoid memory leak #196

Open wxxion opened 1 year ago

wxxion commented 1 year ago

According to Apple doc, it's the responsibility of caller of SecAccessControlCreateWithFlags and SecItemCopyMatching to release the returned CF object. So we should __bridge_transfer the ownership to corresponding Objective-C object to manage the memory with ARC.