Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!pasteur!ucbvax!hoptoad!tim
From: tim@hoptoad.uucp (Tim Maroney)
Newsgroups: comp.sys.mac
Subject: Re: No Finder with Multifinder
Message-ID: <4774@hoptoad.uucp>
Date: 27 Jun 88 18:33:40 GMT
References: <1123@aucs.UUCP> <8964@dartvax.Dartmouth.EDU>
Reply-To: tim@hoptoad.UUCP (Tim Maroney)
Organization: Eclectic Software, San Francisco
Lines: 33

In article <8964@dartvax.Dartmouth.EDU> earleh@eleazar.dartmouth.edu (Earle
R. Horton) writes:

>A word of caution is indicated here:  When you call ExitToShell
>without the knowledge and consent of the running application, then
>said application does not get to do whatever cleanup it needs to do
>when it exits.  With the Finder, this means that if you spend a lot of
>time rearranging your DeskTop, then blast it with an ExitToShell FKEY,
>your DeskTop changes will not get recorded on disk.

But ExitToShell closes all the application's open resource files, and
closing a resource file to which changes have been made automatically writes
the changes to disk.  At least, this is so if you don't bypass the Resource
Manager and do your own resource file i/o, which some Apple software does.
Have you actually seen this happen, or is it speculation?

There used to be a way for an application to guarantee cleanup, but it was
inconvenient - the IAZNotify low-memory routine pointer.  You aren't
supposed to use it any more.  Few people did anyway, because you couldn't
safely store a pointer into one of your code segments.  Some applications
(including, if memory serves, the Finder) guaranteed cleanup simply by
patching their cleanup code into ExitToShell.

So it's not completely true to say that using an ExitToShell FKEY will
prevent the application from cleaning up.  It's just a matter of how much
work the application developer put into guaranteeing cleanup.

>Earle R. Horton, Thayer School of Engineering, Hanover, NH
-- 
Tim Maroney, Consultant, Eclectic Software, sun!hoptoad!tim
"As I was walking among the fires of Hell, delighted with the enjoyments of
 Genius; which to Angels look like torment and insanity.  I collected some of
 their Proverbs..." - Blake, "The Marriage of Heavern and Hell"