COM/DCOM always obeys the factory design pattern. Thus client does not have the authority for allocation or de-allocation of the COM object. Client passes a reference of a pointer to the COM object to server through CreateInstance() or QueryInterface() call. Server allocates the object and returns the pointer to client. Client uses this object and at the end deletes it by Release() call. Client does not have the authority to directly delete the object using free/delete in C++ because it has been allocated by server. So client always calls Release() which decrements the reference count of objects in server-side and when object count reaches to zero it deletes the object from server.

About our authors: Team EQA

You have viewed 1 page out of 67. Your COM/DCOM learning is 0.00% complete. Login to check your learning progress.