home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / programm / 13111 < prev    next >
Encoding:
Text File  |  1992-07-28  |  1.4 KB  |  55 lines

  1. Path: sparky!uunet!gatech!pitt.edu!usenet.cis.pitt.edu!andre
  2. From: andre@flash.cs.pitt.edu (Andre "A Mac Plumber" Srinivasan)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: q: quit w/o resetting gworld mungs desktop
  5. Message-ID: <ANDRE.92Jul28154050@flash.cs.pitt.edu>
  6. Date: 28 Jul 92 19:40:50 GMT
  7. Sender: news+@pitt.edu
  8. Distribution: na
  9. Organization: Acme Plumbing Services And Exploding Cigars
  10. Lines: 43
  11.  
  12.  
  13. if you run the following program in tc (and i assume in mpw), the
  14. window that is drawn is not cleaned up and the desktop retains the
  15. window's image in video memory.
  16.  
  17. should i be concerned that the toolbox is not cleaning up after me in
  18. this particular situation (will i eventually crash if i don't reboot)?
  19.  
  20. if i plan on debugging code where this could happen (by quitting out
  21. of the debugger before resetting the gworld), should i look into
  22. patching exittoshell to reset the gworld?
  23.  
  24. are there other situations that i should be aware of where
  25. the toolbox won't cleanup after me?
  26.  
  27. thanks.
  28.  
  29.                                 -andre.
  30.  
  31. /*------------------------*/
  32.  
  33. void main(void)
  34. {
  35. GWorldPtr gwp;
  36. Rect r;
  37. WindowPtr wp;
  38.  
  39. uinittoolbox(0);
  40.  
  41. ugetboundsrect(&r);
  42.  
  43. wp = NewWindow(NULL, &r, "\p", TRUE, documentProc, FOREGROUND, TRUE, 0);
  44. NewGWorld(&gwp, 0, &r, NULL, NULL, 0);
  45. SetGWorld(gwp, NULL);
  46.  
  47. uexittoolbox();
  48. }
  49.  
  50. --
  51. Andre Srinivasan  : 
  52. 734 LRDC          : "Well scratch my back with a hacksaw."
  53. U. of Pittsburgh  :                    - Mike Lange
  54. andre@cs.pitt.edu :
  55.