Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!sdd.hp.com!spool2.mu.edu!news.cs.indiana.edu!ux1.cso.uiuc.edu!uxa.cso.uiuc.edu!ml27192 From: ml27192@uxa.cso.uiuc.edu (lanett mark) Newsgroups: comp.sys.mac.programmer Subject: Re: Linked Lists: Handles or Pointers? Message-ID: <1991Jan24.203150.24546@ux1.cso.uiuc.edu> Date: 24 Jan 91 20:31:50 GMT References: <1991Jan23.002212.7648@umiami.ir.miami.edu> Sender: news@ux1.cso.uiuc.edu (News) Organization: University of Illinois at Urbana Lines: 16 gross@umiami.ir.miami.edu (Mondo) writes: >Okay folks, here's yer big chance to solve a silly little argument for >three of us novice Mac programmers. >If you want to create a linked list, do you have to: > a) Use a handle to the head node only and use pointers > for the rest of the list (Problem we see: the Memory > Manager will compact the heap and make all those ptrs invalid.) If you use pointers and allocate structures with new then they are "locked" and will not be moved by the memory manager. Handles are for your memory conveniece only. Mark Lanett