nsCOMPtr
Welcome to the nsCOMPtr
page.
nsCOMPtr
Documentation
-
The Complete
nsCOMPtr
User'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
nsCOMPtr
s 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,
nsCOMPtr
s, and `nsIPtr's. - Some COM Ownership Guidelines gives a brief set of guidelines to help you build a supportable ownership model.
-
Retired:
getter_doesnt_AddRef
is gone (Re:nsCOMPtr
questions) 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_AddRefs
and friends (Re:nsCOMPtr
questions) is an email message that further delves intogetter_AddRefs
and 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 nsCOMPtr
s 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
QueryInterface
shows one good way to implementQueryInterface()
.