Absolutely normal and prefers to pass it as const &.
Passing by value is acceptable in terms of semantics, not so much from performance, as passing leads to the fact that overflow of the refcount occurs up and down, and both are "interconnected" operations with serious consequences. And we get nothing in return.
The advantage of ComPtr is that it allows you to properly match Release calls that are too easy to mess up with, and even if it was easy, the mess of the code it takes is unpleasant.
source share