Interfaces and C++ references (off-topic)
- From: "Goran Pusic" <goran_pusic@xxxxxxxxx>
- Date: Sun, 18 Dec 2005 07:22:15 +0100
Hi all!
When in the "client code", that is, when not interfacing with COM calls,
what do you think about passing COM interfaces by reference (as done in
C++)?
Example:
SomeFunc(SomeComServer& Server);
and then:
SomeComServer* pServer;
ObtainServer(&pServer);
SomeFunc(*pServer);
SomeOtherFunc(*pServer);
pServer->Release();
I know this works. I prefer it to pointers for the usual reasons we prefer
references to pointers in C++. But, I wanted to know public opinion. Do you
do it, or do frown upon it, and if so, why? Is there some COM etiquette
regarding this...?
.
- Follow-Ups:
- Re: Interfaces and C++ references (off-topic)
- From: Igor Tandetnik
- Re: Interfaces and C++ references (off-topic)
- Prev by Date: Re: shutdown does not cleanly stop services?
- Next by Date: Re: Interfaces and C++ references (off-topic)
- Previous by thread: Consumer templates, blobs, attributed
- Next by thread: Re: Interfaces and C++ references (off-topic)
- Index(es):
Relevant Pages
|