Windows Driver Kit: User-Mode Driver Framework
IObjectCleanup
Any driver that stores a reference-counted COM interface to 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.
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.
In addition to the methods that IObjectCleanup inherits from the IUnknown interface, IObjectCleanup supports the following method: