
i
i
i
i
i
i
i
i
12.4. The Component Object Model 299
Figure 12.2. An example of a COM interface specification.
offered, it would not be particularly useful. However, IUnknown is essential
because it is a COM object’s way of giving access to the other interfaces that
it supports, and it is the way memor y usage by COM objects is managed.
Instances of COM objects and their interfaces take up memory; therefore,
when they are no longer required, that memory should be released (freed up).
That sounds simple enough, but because the same COM object may be in
use by the different interfaces that it offers, by different programs and even
by different hosts, it is not ...