nsCOMPtr
Welcome to the nsCOMPtr page.
nsCOMPtr Documentation
-
The Complete
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
nsCOMPtrs before. - 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.
-
Retired:
getter_doesnt_AddRefis gone (Re:nsCOMPtrquestions) is an email message describinggetter_AddRefs, the now defunctgetter_doesnt_AddRef, and some esoterica about services. This document is retired, but still accurate. Prefer the User's Manual mentioned above. -
Retired:
getter_AddRefsand friends (Re:nsCOMPtrquestions) is an email message that further delves intogetter_AddRefsand alternatives. This document is retired; the innaccuracies are noted at the top. Prefer the User's Manual mentioned above.
Help Wanted:
I want the nsCOMPtr User's Manual to be useful,
particularly to people who haven't used nsCOMPtrs before.
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.
See Also
- The XPCOM Home Page.
- C++ portability guide
-
A Reference Implementation of
QueryInterfaceshows one good way to implementQueryInterface().