The lifetime of each COM interface pointer is controlled by its reference count. When a new reference to a COM interface pointer is made, the function add-ref should be called to increment its reference count. When a reference is removed, the function release should be called to decrement it again. The macro with-temp-interface can be useful when working with temporary interface pointers to ensure that they are released when a body of code exits in any way.
Refer to standard COM texts for more details of the reference counting rules. The LispWorks COM API does not perform any automatic reference counting (sometimes called smart pointers in C++).