Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!psuvax1!swatsun!jackiw From: jackiw@cs.swarthmore.edu (Nick Jackiw) Newsgroups: comp.sys.mac.programmer Subject: Re: Hanging due to repeated modaldialog call Message-ID: <60MPZTB@cs.swarthmore.edu> Date: 29 Aug 90 14:48:08 GMT References: <25928@cs.yale.edu> Reply-To: jackiw@cs.swarthmore.edu (Nick Jackiw) Organization: Visual Geometry Project, Swarthmore College, PA Lines: 22 tarr-michael@CS.YALE.EDU (michael tarr) writes: > Any suggestions as to why calling this more than 4 or 5 times with 4 or > 5 TE windows open hangs the system (not even a bomb)? > itemList = GetResource( 'DITL', SAVE_DITL_ID ); > saveDialog = NewDialog( NIL_POINTER, &boundsRect, NIL_TITLE, TRUE, > dBoxProc, MOVE_TO_FRONT, NO_GO_AWAY, NIL_REF_CON, itemList ); > ModalDialog( NIL_POINTER, &itemHit ); > DisposDialog( saveDialog ); > ReleaseResource( itemList ); Doesn't DisposDialog release the memory for the item list as well as for the dialog record itself? ReleaseResource is then being called on already released/disposed data. ReleaseResource's behavior in this case isn't strictly documented, and may be your problem. -- ------------------------ Nick Jackiw jackiw@cs.swarthmore.edu "We are what we think, Visual Geometry Project jackiw@swarthmr.bitnet having become what we