Skip to content

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

Open
wxxion wants to merge 1 commit intokishikawakatsumi:masterfrom
wxxion:master
Open

Transfer ownership of returned CF objects to avoid memory leak#196
wxxion wants to merge 1 commit intokishikawakatsumi:masterfrom
wxxion:master

Conversation

@wxxion
Copy link

@wxxion wxxion commented Jan 25, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant