Release
Microsoft DirectX 9.0 SDK Update (October 2004)

IUnknown::Release Method


Decreases the reference count of the interface by 1.

Syntax

ULONG Release(VOID);

Return Value

Returns the new reference count. This value is for diagnostic and testing purposes only.

Remarks

The object that exports the interface deallocates itself when its total reference count reaches 0. Use the IUnknown::AddRef method to increase the interface's reference count by 1.

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



© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.