Platform SDK: DirectX

IUnknown::Release

The IUnknown::Release method decreases the reference count of the object by 1.

ULONG Release();

Parameters

There are no parameters.

Return Values

Returns the new reference count. This value is meant to be used for diagnostic and testing purposes only.

Remarks

The object deallocates itself when its reference count reaches 0. Use the AddRef method to increase the object's reference count by 1.

Applications must call this method to release only interfaces that it explicitly created in a previous call to IUnknown::AddRef, IUnknown::QueryInterface, or a creation function such as DirectDrawCreate.

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Unknwn.h.