Article View: comp.sys.mac
Article #15303Handling Out-of-memory right
From: stew
Date: Sun, 29 Mar 1987 00:18
Date: Sun, 29 Mar 1987 00:18
17 lines
1395 bytes
1395 bytes
Anyone have any suggestions for handling out-of-memory conditions which occur during QuickDraw operations properly? I am already doing things like allocating a buffer which is released by a growZone function and, of course, checking all my memory management functions error returns. Unfortunately, things like UnionRgn will just crash if they run out of memory, and I know of no good way to tell in advance if there is enough memory for them... For example, the Union of two disjoint rectangular regions takes much more memory than the two regions by themselves. I feel that the designers of Quickdraw screwed up in a big way by not returning an error code from these functions. In fact, all drawing routines are potential problems if you are accumulating a picture, region, or polygon... What solutions do other developers use for this problem?
Technical Details
Message-ID:
<1518@husc6.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!husc6!endor!stewShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!husc6!endor!stew From: stew@endor.UUCP Newsgroups: comp.sys.mac Subject: Handling Out-of-memory right Message-ID: <1518@husc6.UUCP> Date: Sat, 28-Mar-87 19:18:34 EST Article-I.D.: husc6.1518 Posted: Sat Mar 28 19:18:34 1987 Date-Received: Sun, 29-Mar-87 10:27:55 EST Sender: news@husc6.UUCP Reply-To: stew@endor.UUCP (Stew Rubenstein) Organization: Aiken Computation Lab Harvard, Cambridge, MA Lines: 17