EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

IUnknown::Release method

Decrements the reference count for an interface on an object.

Syntax


ULONG Release();

Parameters

This method has no parameters.

Return value

The method returns the new reference count. This value is intended to be used only for test purposes.

Remarks

When the reference count on an object reaches zero, Release must cause the interface pointer to free itself. When the released pointer is the only existing reference to an object (whether the object supports single or multiple interfaces), the implementation must free the object.

Note that aggregation of objects restricts the ability to recover interface pointers.

Notes to Callers

Call this method when you no longer need to use an interface pointer. If you are writing a method that takes an in-out parameter, call Release on the pointer you are passing in before copying the out-value on top of it.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Unknwn.h

IDL

Unknwn.idl

IID

IID_IUnknown is defined as 00000000-0000-0000-C000-000000000046

See also

IUnknown

 

 

Contribuições da comunidade

ADICIONAR
Mostrar:
© 2014 Microsoft