Clicking on the graph after the main window has closed does't break #2146
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DINFO has many cross-linking, cyclic-pointer dependencies among a bunch of windows: main text window, graph window, history window, menu window, and submenu window.
All of these need access to the DINFOGRAPH datastructure so that they all see the same state. Some of them store it as their own WINDOWPROP, others get it from the WINDOWPROP of the main text window through the attachment pointers.
It was previously noticed that clicking in the graph window caused an error (DINFOGRAPH NIL) if the main window had been closed (which takes down all the other windows) and then reopened with a new "man" command. This is because the close function at least on the text window removed its DINFOGRAPH pointer as a way of breaking the cycles and allowing collection. But the configuration of links was not completely restored at the next command, and the error ensued.
But cycle-breaking is not particular useful for this application, since the windows are being held onto so that they can come up again on the next command--someone outside the cycle is always holding on to something. So for this PR I eliminated the error in the obvious way: I took out the code that was trying to smash the links.
With a little (or maybe a lot) more work to undertand and rationalize all the relationships, it ought to be the case that there is one crucial link that maintains the cycle, say, the link from the text window to the DINFOGRAPH. Then it would be clear how to break it if collection ever became an issue. But for now, I think it is better to go for robustness.