When a user closes an instance of the Array Viewer that has been invoked programmatically, the Viewer window is hidden, but the process is still running. You could call CAViewer::IsVisible () periodically to see if the user has closed the Viewer.
By the way, it's important in a multithreaded program that only one thread interact with the CAViewer class; it's not thread-safe.
CloseOnRelease is a property that when set, causes the Viewer to exit when the interface is released, ie. when the CAViewer class is destroyed. If not set, the Viewer will keep on running after the app that invoked it exits.