We've so far ignored the issue of what should happen when the user of a Haskell COM component finally signals that it is through with using the component. Here's a sketch of how support for it can be added:
release, the action releaseObj
is called.releaseObj can as part of its
clean up, call an component-specific release operation. Since the
implementation of release is shared across all Haskell COM
components, this has to be setup by storing a reference to it in the
interface header.release.ToDo:The above setup will create a reference count per-interface, and not per-component instance. We probably want to go for the latter, so this should be fixed ASAP.