Bug 238780 - Convention to indicate caller is responsible for maintaining external ref
Summary: Convention to indicate caller is responsible for maintaining external ref
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-04-04 18:32 PDT by Gabriel Nava Marino
Modified: 2022-04-11 18:33 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriel Nava Marino 2022-04-04 18:32:25 PDT
As recommended by Sam in bug 238747 and as this seems to be the preferred pattern to ensure a ref counted object remains for the scope of the call:

> I wonder ifs we should come up with some convention (naming or otherwise) to
> indicate that a caller is responsible for maintaining an external ref. Like,
> Document::close_mayDestroy(), or perhaps even take it a step further and
> require a separate type to call close()?  
> 
> Ref closer = document.closer()
> closer.close()
Comment 1 Radar WebKit Bug Importer 2022-04-11 18:33:15 PDT
<rdar://problem/91601054>