All Manuals > COM/Automation User Guide and Reference Manual > 2 COM Reference Entries

release Function

Summary

Decrements the reference count of an interface pointer.

Package

com

Signature

release interface-ptr => ref-count

Arguments
interface-ptr
A COM interface pointer.
Values
ref-count
The new reference count.
Description

Each COM interface pointer has a reference count which is used by the server to control its lifetime. The function release should be called whenever a reference to interface-ptr is being removed. The function invokes the COM method IUnknown::Release so the form (release ptr) is equivalent to using call-com-interface as follows:

(call-com-interface (ptr i-unknown release))
Examples
(release p-foo)
See also

add-ref
interface-ref
query-interface
with-temp-interface


COM/Automation User Guide and Reference Manual - 01 Dec 2021 19:38:38