Welcome to the
nsCOMPtrUser's Manual describes a `smart-pointer' class for [XP]COM. This document should have all the information you need. It's really three documents in one:
- The Getting Started Guide is short, to the point, and will help you if you've never used
- The Reference Manual explains things in more detail than you could possibly want.
- The Frequently Asked Questions may help you fix a broken build, or direct you to the right spot in the reference manual.
Code bloat [LONG, summary at top] reports on bloat tests
comparing raw pointers,
nsCOMPtrs, and `nsIPtr's.
- Some COM Ownership Guidelines gives a brief set of guidelines to help you build a supportable ownership model.
getter_doesnt_AddRefis gone (Re:
nsCOMPtrquestions) is an email message describing
getter_AddRefs, the now defunct
getter_doesnt_AddRef, and some esoterica about services. This document is retired, but still accurate. Prefer the User's Manual mentioned above.
getter_AddRefsand friends (Re:
nsCOMPtrquestions) is an email message that further delves into
getter_AddRefsand alternatives. This document is retired; the innaccuracies are noted at the top. Prefer the User's Manual mentioned above.
I want the
nsCOMPtr User's Manual to be useful,
particularly to people who haven't used
Your feedback is valuable.
Please read the Getting Started Guide
and let me know what it's missing,
what helped you, and what confused you.
- The XPCOM Home Page.
- C++ portability guide
A Reference Implementation of
QueryInterfaceshows one good way to implement