[webkit-dev] Tightening up smart pointer usage rules
levin at chromium.org
Tue Jun 29 11:23:58 PDT 2010
btw, looking at Darin's earlier note about releaseRef. I think it would be
consistent to rename releaseRef to be leakRef.
On Tue, Jun 29, 2010 at 11:14 AM, Geoffrey Garen <ggaren at apple.com> wrote:
> > I like leakPtr.
> > Personally, releasePtr() is so close to release() (which is safe) that I
> could easily overlook it in a code review and not realize that it hands off
> a raw pointer with a ref count on it.
> > dave
> Anders once argued against the name leakPtr, "Well, then you might as well
> rename 'malloc' to 'leak'."
> The more I think about it, though, the more I think that "malloc" really
> should be named "leak", at least from the WebKit project's perspective.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev