The cleanest and safest way of exiting is the following:
We recommend that you log out at least once a day. Unix memory management is such that allocated blocks of memory are never truly freed for reuse until a process dies. IRAF, on the other hand, will arrange to keep a process around indefinitely (even after a task exits) to avoid the rather stiff startup penalties that sometimes apply. This can become a problem if an observer runs a memory-hungry task, such as imcombine, over and over for several days.