An interface enters "preserving-state" context just before it is destroyed by
hcl:save-current-session, and exits the context just after interface-display returns.
If the interface
is in "preserving-state" context, then
:different-invocation. The value
t means that the current invocation of LispWorks is still the same invocation. The value
:different-invocation means it is a different invocation, in other words it is the saved image that is restarted.
In other circumstances
interface-preserving-state-p can return
:keeping-processes, which means that the interfaces are destroyed but processes that are not associated with
are not killed. That currently happens only on Microsoft Windows when the programmer changes the arrangement of IDE windows via
Preferences... > Environment > General > Window Options
interface-preserving-state-p is typically used in the
of an interface or a pane to decide whether really to destroy the information, and in the
or interface-display to decide whether the existing information can be used. Note that if it is a pane, it needs to find the top-level-interface.
Information that is made entirely of Lisp objects can be preserved in all cases. Information that is associated with external objects is invalid when the image is restarted. So when
interface-preserving-state-p is used inside the
or interface-display, external information can be preserved only if it returns
t, the external information may be preserved, unless it is tied to the lightweight process.
CAPI User Guide and Reference Manual (Macintosh version) - 25 Feb 2015