[Webkit-unassigned] [Bug 256311] New: RetainPtr<>::leakRef() should have NS/CF_RETURNS_RETAINED attributes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 4 09:07:46 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=256311

            Bug ID: 256311
           Summary: RetainPtr<>::leakRef() should have
                    NS/CF_RETURNS_RETAINED attributes
           Product: WebKit
           Version: Other
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Template Framework
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ddkilzer at webkit.org

RetainPtr<>::leakRef() should have NS/CF_RETURNS_RETAINED attributes.

This will let the clang static analyzer do a better job of detecting leaks.

The trick to making this work is using `template<typename U = T>` to allow for template specialization and SFINAE without using the template type (`T`) for the entire class, as noted here:
<https://stackoverflow.com/questions/11531989/what-happened-to-my-sfinae-redux-conditional-template-class-members>

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230504/948dd0e8/attachment.htm>


More information about the webkit-unassigned mailing list