Smart Pointers
-
I have little confusion that i wanted to clear out. Please see the following code: //defination SetMstrRS(IMstrRS * pMS); CComPtr <IMstrRS> pMS; pMS.CoCreateInstance(...); SetMstrRS(pMS); Now in the last statment is AddRef called by SmartPointer before it is passed to the method. thanks in advance qur
-
I have little confusion that i wanted to clear out. Please see the following code: //defination SetMstrRS(IMstrRS * pMS); CComPtr <IMstrRS> pMS; pMS.CoCreateInstance(...); SetMstrRS(pMS); Now in the last statment is AddRef called by SmartPointer before it is passed to the method. thanks in advance qur
No, the interface is not AddRef'd because the parameter is created by a call to the
operator T*
converter, which just returns the encapsulated interface pointer. Step through the code to see for yourself. --Mike-- Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber CP SearchBar v2.0.2 released