NEW 263538
Make it possible to immediately wrap a retained out param in a smart pointer
https://bugs.webkit.org/show_bug.cgi?id=263538
Summary Make it possible to immediately wrap a retained out param in a smart pointer
Simon Fraser (smfr)
Reported 2023-10-23 11:41:30 PDT
We have a lot of code that calls system APIs that return retained pointers like this: SecAccessRef accessRef; status = SecAccessCreate((__bridge CFStringRef)localizedItemName, nullptr, &accessRef); RetainPtr<SecAccessRef> access = adoptCF(accessRef); This is error prone and makes it hard to write a style checker that finds adoptCF() errors. We should make it possible to have a smart pointer initialized directly at the point of "&accessRef".
Attachments
Radar WebKit Bug Importer
Comment 1 2023-10-23 17:35:35 PDT
Simon Fraser (smfr)
Comment 2 2023-10-23 17:38:26 PDT
Note You need to log in before you can comment on or make changes to this bug.