Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!uunet!overload!dillon From: dillon@overload.Berkeley.CA.US (Matthew Dillon) Newsgroups: comp.sys.amiga.programmer Subject: Re: Memory fragging Message-ID: Date: 23 May 91 17:19:36 GMT Article-I.D.: overload.dillon.8035 References: <1991May21.195251.16477@zorch.SF-Bay.ORG> <21795@cbmvax.commodore.com> Organization: Not an Organization Lines: 28 In article <21795@cbmvax.commodore.com> peter@cbmvax.commodore.com (Peter Cherna) writes: >In article <1991May21.195251.16477@zorch.SF-Bay.ORG> mike@zorch.SF-Bay.ORG (Mike Smithwick) writes: >... > >Do as much as you can to free your resources in the reverse order that >you obtained them in. Avoid using FreeRemember(FALSE). Avoid >doing Alloc(A);Alloc(B);Alloc(C), ... , Free(B). Why? What's wrong with Alloc(A) Alloc(B) Alloc(C) .. Free(B) Free(A) Free(C) ? -Matt >>mike > > Peter >-- >Peter Cherna, Operating Systems Development Group, Commodore-Amiga, Inc. >{uunet|rutgers}!cbmvax!peter peter@cbmvax.commodore.com >My opinions do not necessarily represent the opinions of my employer. >"If all you have is a hammer, everything looks like a nail." -- Matthew Dillon dillon@Overload.Berkeley.CA.US 891 Regal Rd. uunet.uu.net!overload!dillon Berkeley, Ca. 94708 USA