[webkit-dev] Tightening up smart pointer usage rules
Geoffrey Garen
ggaren at apple.com
Tue Jun 29 11:14:27 PDT 2010
> 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
+1
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.
Geoff
More information about the webkit-dev
mailing list