Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!sol.ctr.columbia.edu!samsung!uunet!timbuk!cs.umn.edu!kksys!edgar!mmug!p510.f22.n282.z1.mmug.edgar.mn.org!Jim.Spencer From: Jim.Spencer@p510.f22.n282.z1.mmug.edgar.mn.org (Jim Spencer) Newsgroups: comp.sys.mac.programmer Subject: Re: Linked Lists: Handles or Pointers? Message-ID: <1.27A6602F@mmug.edgar.mn.org> Date: 30 Jan 91 02:51:08 GMT Sender: ufgate@mmug.edgar.mn.org (newsout1.26) Organization: FidoNet node 1:282/22.510 - The Love Shack, Bloomington MN Lines: 22 Annard Brouwer writes in a message to All AB> procedure test; AB> var blah: HandleType; AB> begin AB> blah:=BigBlah; AB> "now I can do whatever I like with whatever AB> toolbox call I would like to use..." AB> BigBlah:=blah; AB> end; AB> Ready, and I don't have to use those ^*&%$@##$ calls like MoveHHi AB> etcx etc... This is also a recommended way of doing it! I must be missing something: how does this in anyway help you in locking down your handles or in moving them high before you do so? Yea, you've created a variable in high global memory to hold the handle but that in turn is going to reference a master pointer (hopefully at the bottom of the Application heap because you've used sufficient calls to MoreMasters) which will actually point to your relocatable block which will be wherever the Memory Manager created it. If you don't move it high (the block, NOT the handle) you will create islands when you lock it. And if you don't lock it and the memory manager moves it when you do your toolbox call that can move memory (keeping in mind that the Memory manager controls it, NOT YOU, unless you lock it) your BigBlah will be exactly that: Blah. Crash and burn time folks. Can you say "dangling pointer?" -- Jim Spencer - via The Minnesota Macintosh Users Group UUCP-Fido Gateway UUCP: ...uunet!tcnet!kksys!edgar!mmug!22.510!Jim.Spencer INET: Jim.Spencer@p510.f22.n282.z1.mmug.edgar.mn.org