🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #17890

Re: TextEdit error checking

#17890
From: Stew Rubenstein
Date: Thu, 06 Aug 1987 03:41
31 lines
2058 bytes
In article <8654@ut-sally.UUCP> brian@ut-sally.UUCP (Brian H. Powell) writes:
>
>     Okay, next question.  How do you figure out if TextEdit had problems
>carrying out some operation?
>
>     I've been pushing my program to the limit to try to iron out what happens
>when it gets low on memory.

After much work trying to handle all the out-of-memory cases and being
totally scrupulous about checking MemError every time I turn around, I
gave up.  My conclusion after much work trying to deal with running
out of memory is: don't.  What I do is keep a big chunk around and
release it in my GrowZone function.  If the buffer can't be
reallocated the next time through the event loop, I put up an alert
and disable everything but save.  If the GrowZone gets called, and the
buffer has already been deallocated, my program issues prayers to
Hertzfeld, Atkinson, and the Woz, unloads every segment but CODE 1
(where the main program, the growzone function, and all functions
needed to save files reside), saves the user's documents in
filenames like "Budget Worksheet (save1)", and ExitToShell().
My ResumeProc calls the same function (you gotta SetupA5 and
UseResFile(myAppFile) first).

You do have a GrowZone and ResumeProc, don't you?

Stew

Stew Rubenstein
Cambridge Scientific Computing, Inc.
UUCPnet:    seismo!harvard!rubenstein            CompuServe: 76525,421
Internet:   rubenstein@harvard.harvard.edu       MCIMail:    CSC
Technical Details
Message-ID: <2651@husc6.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!husc6!endor!stew
References: <8654@ut-sally.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!husc6!endor!stew
From: stew@endor.harvard.edu (Stew Rubenstein)
Newsgroups: comp.sys.mac
Subject: Re: TextEdit error checking
Message-ID: <2651@husc6.UUCP>
Date: Wed, 5-Aug-87 23:41:59 EDT
Article-I.D.: husc6.2651
Posted: Wed Aug  5 23:41:59 1987
Date-Received: Sat, 8-Aug-87 09:12:24 EDT
References: <8654@ut-sally.UUCP>
Sender: news@husc6.UUCP
Reply-To: stew@endor.UUCP (Stew Rubenstein)
Organization: Aiken Computation Lab Harvard, Cambridge, MA
Lines: 31
Keywords: Running Out of Memory