Skip to content

OnFinalRelease Method

Called during destruction of a driver instance.

virtual HRESULT OnFinalRelease();

Co<MainClass>.cpp

Returns S_OK if successful, otherwise a failure HRESULT.

The OnFinalRelease method executes only once on the main driver class over the lifetime of the driver, irrespective of the number of times a client application calls IIviDriver::Initialize and IIviDriver::Close.

The OnFinalRelease is generally used to cleanup resources allocated in OnFinalConstruct.