This script will delete common INTViewer Python variables after clear all is called.
Put this script in the folder On_After_Clear_All in your Python scripts directory.
Go to Tools->Options->Environment->Python Scripts and click "Refresh from Disk". Your script should be listed automatically.
Now, whenever a clear all event is called, the variables 'window', 'layer', 'data', and 'source' will be deleted.
This simple script can be used to prevent your from accessing variables that no longer represent anything in INTViewer.