CComTearOffObject

This class implements a tear-off interface as a separate object that is instantiated only when that interface is queried for. The tear-off is deleted when its reference count becomes zero. Typically, you build a tear-off interface for an interface that is rarely used, since using a tear-off saves a vtable pointer in all the instances of your main object.

At a Glance

Header file: Atlcom.h
Windows CE versions: 2.0 and later
Complete documentation: Visual C++ documentation

Syntax

template< class Base >

class CComTearOffObject : public Base

Parameters

Base is a tear-off class, derived from CComTearOffObjectBase, and the interfaces that the tear-off object supports. It is responsible for handling the reference count and QueryInterface.