Path: utzoo!attcan!uunet!fernwood!apple!lsr From: lsr@Apple.COM (Larry Rosenstein) Newsgroups: comp.sys.mac.programmer Subject: Re: NewHandle(0L) ? Message-ID: <10830@goofy.Apple.COM> Date: 20 Oct 90 00:27:43 GMT References: <32600007@inmet>, <1990Oct19.135936.27307@ux1.cso.uiuc.edu> Organization: Apple Computer, Inc. Lines: 20 vd09+@andrew.cmu.edu (Vincent M. Del Vecchio) writes: >In article <32600007@inmet> gregh@inmet.inmet.com writes: >> Is it permissable to call NewHandle (or NewPtr) with 0 as an argument? >If you're not worried about 64K ROM compatibility, you can also call >NewEmptyHandle, which does the same thing. These aren't exactly the same. NewEmptyHandle allocates the master pointer but not the heap block. You will have to call ReallocHandle when you really need the storage. In that sense, it is better than calling NewHandle(0L), which will allocate at least 8 bytes in the heap. (Those bytes will be moved around if necessary.) You do have to be aware of the differences, however. -- Larry Rosenstein, Object Specialist Apple Computer, Inc. 20525 Mariani Ave, MS 3-PK Cupertino, CA 95014 AppleLink:Rosenstein1 domain:lsr@Apple.COM UUCP:{sun,voder,nsc,decwrl}!apple!lsr