Customer requested for this idea.
There is no event handler for closing DXP. For example, if users want to initialize the system immediately after startup, they can add flexible functionality by embedding python codes in a process called Init (event handler). However, Spotfire does not have a process like Dispose that corresponds to Init when closing.