5/9/08

How does a _com_ptr_t object help you control the lifetime of a COM server?

A _com_ptr_t object helps manage the lifetime of your COM server object by calling the
IUnknown::AddRef() and IUnknown::Release() methods of the encapsulated interface on your behalf.
AddRef() is called automatically when a _com_ptr_t object is created as a copy
from an existing interface pointer, and Release() is called automatically when a
_com_ptr_t object goes out of scope.

No comments: