CComTearOffObject

CComTearOffObject 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.

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.

At a Glance

Header file: Atlcom.h
Platforms:
Versions: 2.0 and later
Complete documentation: Visual C++ documentation

See Also

CComTearOffObject Methods, CComTearOffObject Data Members