Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!sunc.osc.edu!malgudi!caen!sol.ctr.columbia.edu!samsung!know!sdd.hp.com!wuarchive!julius.cs.uiuc.edu!apple!gateway.qm.apple.com!sean_parent.snarkmail_l_z From: sean_parent.snarkmail_l_z@gateway.qm.apple.com (Sean Parent) Newsgroups: comp.sys.mac.programmer Subject: Re: NewHandle(0) Message-ID: <10826@goofy.Apple.COM> Date: 19 Oct 90 23:24:14 GMT Sender: usenet@Apple.COM Organization: Apple Computer, Inc. Lines: 16 References:<1549@exodus.Eng.Sun.COM> <1990Oct19.204536.4128@engin.umich.edu> In article <1990Oct19.204536.4128@engin.umich.edu> mystone@mondo.engin.umich.edu (Dean Yu) writes: > Whether or not NewHandle(0) works or not is kinda moot, since there's a > _NewEmptyHandle call which does the same thing as NewHandle(0). > _NewEmptyHandle has been around since the 128K ROMs and is documented in > Inside Mac IV. Wrong! (Sorry Dean.) NewEmptyHandle creates a handle to a nil master pointer. This is not the same as a handle to an empty block. In order to use a handle to nil master pointer (either one created by calling NewEmptyHandle or one created by call EmptyHandle on an existing handle) you must first reallocate the memory by call ReallocHandle before calling SetHandleSize. But NewHandle(0) does work just fine in all cases (no bugs that I know of and I've been using it for years!) Sean Parent "Quality unattainable in a reasonable amount of time."