Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!elroy.jpl.nasa.gov!usc!rpi!zaphod.mps.ohio-state.edu!hobbes.physics.uiowa.edu!maverick.ksu.ksu.edu!ux1.cso.uiuc.edu!pequod.cso.uiuc.edu!dorner From: dorner@pequod.cso.uiuc.edu (Steve Dorner) Newsgroups: comp.sys.mac.programmer Subject: Re: Question about resource handle. Message-ID: <1991Jun27.195755.24150@ux1.cso.uiuc.edu> Date: 27 Jun 91 19:57:55 GMT References: <1991Jun27.174311.18097@midway.uchicago.edu> Sender: usenet@ux1.cso.uiuc.edu (News) Organization: University of Illinois at U-C Lines: 13 In article <1991Jun27.174311.18097@midway.uchicago.edu> chh9@quads.uchicago.edu (Conrad Halton Halling) writes: >I realize the size of this resource (640 bytes) is small, but I would like >to know which is the best strategy for locking the handle: >2) I could get the resource without the "locked" attribute set, then > MoveHHi( myHandle ) and HLock( myHandle ). Unless you plan to be allocating memory during your calculations, I suggest you lock it when you start your calculations and unlock it when you're done. Skip the MoveHHi; it will be slow and won't buy you anything, UNLESS you allocate memory while the handle is locked. -- Steve Dorner, U of Illinois Computing Services Office Internet: s-dorner@uiuc.edu UUCP: uunet!uiucuxc!uiuc.edu!s-dorner