IObjectCleanup interface

Any driver that stores a reference-counted COM interface to a WDF object must support the IObjectCleanup interface to prevent interface leakage. Note that drivers, in general, are not required to hold references to WDF objects.

Members

The IObjectCleanup interface inherits from the IUnknown interface. IObjectCleanup also has these types of members:

Methods

The IObjectCleanup interface has these methods.

MethodDescription
IObjectCleanup::OnCleanup

The OnCleanup method releases any references to a WDF object to prevent interface leakage.

 

Remarks

The framework calls the method of the IObjectCleanup interface when the associated framework object is about to be released.

A driver can register the IObjectCleanup interface when the driver calls any method that creates a WDF object.

Requirements

Header

Wudfddi.h

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft