IUnknown::Release

ULONG IUnknown::Release(void)

Release a reference to this interface instance.

If AddRef has been called on this object (through any IUnknown members of its interfaces) n times and this is the nth call to Release, then the interface instance will free itself.

Release cannot indicate failure; if a client needs to know that resources have been freed, and so forth, it must use a method in some interface on the object with higher level semantics before calling release.

Argument

Type

Description

return value

ULONG

The resulting value of the reference count. This value is returned solely for diagnostic/testing purposes; it only has meaning when the return is zero meaning that the object cannot be considered valid in any way by the caller. Non-zero values are meaningless to the caller.