Path: utzoo!utgpu!watmath!att!rutgers!ucsd!usc!apple!stadler From: stadler@Apple.COM (Andy Stadler) Newsgroups: comp.sys.mac.hypercard Subject: Re: Memory loss when browsing Message-ID: <36570@apple.Apple.COM> Date: 17 Nov 89 00:17:36 GMT References: <2663@client1.DRETOR.UUCP> Organization: Apple Computer Inc, Cupertino, CA Lines: 25 In article <2663@client1.DRETOR.UUCP> mmt@client1.DRETOR.UUCP (Martin Taylor) writes: > >General question: under what circumstances should a stack be expected >to change its size (i.e. produce free memory in stack) when it is being >browsed at userlevel 1? It seems to me this should never happen, but it >does, and to an alarming degree. > I would guess that the scripts involved in browsing this card are putting data into (possibly hidden) fields. If a field is empty, the card will compact down, but to put text into the field, HyperCard must move the card within the stack file to allow more space (so it can put the text somewhere). Typically, the card will be moved to the end of the stack, so it can grow outward; this leaves a hole of (old card size) where it used to be. If you are _designing_ a stack, and you don't want this happening, the easiest way to fix this is to set "cant modify" in the stack info box. This should prevent HyperCard from ever writing to the disk file. It can, however, slightly slow operation. The rule is, if you've set cantModify, that a script can make all the changes it wants but when you leave the card and come back, it will "snap back" to its original state. That means that even if the card is still in RAM, it must be thrown out and reloaded from disk. --Andy stadler@apple.com