我有一种情况,我需要CComPtr<IXmlReader>
通过引用将 a 传递给函数。被调用参数是否从被调用参数中获取所有权(或)引用计数增加?
void foo( CComPtr<IXmlReader> & pReader )
{
// There is no reassignment of the CComPtr.
// Just call the IXmlReader methods.
}
CComPtr<IXmlReader> pReader;
foo( pReader );
// Is pReader still valid after the function return ?
谢谢。