[webkit-dev] for review: RefPtr document

David D. Kilzer ddkilzer at kilzer.net
Tue Oct 9 10:17:56 PDT 2007

Random thoughts:

- A link to auto_ptr examples/documentation would be nice when it's first

- I'm not clear what this statement says because I'm not sure what "donor"
means (the rvalue of the assignment statement?) and I'm not sure what is being
set to zero (the reference count or the value of the pointer?):  "When you
assign from one auto_ptr to another, the donor becomes 0."

- Specific code examples for each of the "positive" guidelines would be nice.

- It would be nice to have separate documents on the other *Ptr types as
mentioned at the end of the document.

- WTF::getPtr() should be covered somewhere as well.  (Should it always be used
when getting a raw pointer?)

- A document on this subject would be interesting as well:  "How we we mix
reference counting with garbage collection to implement the DOM and the
JavaScript and Objective-C DOM bindings."


Darin Adler <darin at apple.com> wrote:

> Hi folks. Six months ago, I wrote a document about RefPtr <http:// 
> webkit.org/coding/RefPtr.html>.
> I haven't yet put a link to it in the website or the wiki. I'd  
> appreciate feedback on the content, especially from people who have  
> contributed patches using RefPtr and PassRefPtr in the past.
>      -- Darin

More information about the webkit-dev mailing list