Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!sun-barr!sun!imagen!atari!kbad From: kbad@atari.UUCP (Ken Badertscher) Newsgroups: comp.sys.atari.st Subject: Re: Communicating with Desk Accessories Message-ID: <1553@atari.UUCP> Date: 13 Jun 89 01:32:48 GMT References: <8660@chinet.chi.il.us> <507@electro.UUCP> Reply-To: kbad@atari.UUCP (Ken Badertscher) Organization: Atari Corp., Sunnyvale, CA Lines: 30 In article <507@electro.UUCP> ignac@electro.UUCP (Ignac Kolenko) writes: | what happens to this accessory when you switch resolution. what i've been | able to trace myself is that the accessory will get an AC_CLOSE message, | but what is it supposed to do with that?? | | the reason why i'm asking is that only the accessories that i've written | end up eating memory everytime you switch resolutions. the memory that is | eaten is equivalent to the size of the accessory! (not a good situation to | say the least). An AC_CLOSE message means that any resources that your accessory has open are about to go away. Namely, any open files will be closed, Malloc'ed memory will be released, etc. Anything that your accessory sets up while a program is running has a potential for vanishing when the program terminates. AC_CLOSE is the system's way of warning accessories about programs terminating. As far as memory-gobbling is concerned, this is unfortunately how the system works. Whenever you switch resolutions, accessories get re-loaded, and the old ones just hang around using memory. This is a side effect of the way the AES treats res changes: not-quite- a-warmboot. Offhand, I can't think of any quick and easy ways around it. I usually use warmboots to switch resolution ;-). -- ||| Ken Badertscher (ames!atari!kbad) ||| Atari R&D System Software Engine / | \ #include