home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / amiga / programm / 12989 < prev    next >
Encoding:
Text File  |  1992-09-01  |  1.3 KB  |  42 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!math.fu-berlin.de!pbinfo!tron
  3. From: tron@uni-paderborn.de (Matthias Scheler)
  4. Subject: Re: FreeGadgets() causes Enforcer hit??
  5. Message-ID: <1992Sep2.113044.7994@uni-paderborn.de>
  6. Sender: news@uni-paderborn.de (News Uni-Paderborn)
  7. Nntp-Posting-Host: corinth
  8. Organization: Uni-GH Paderborn
  9. References: <1992Sep1.175239.12472@miavx1.acs.muohio.edu>
  10. Date: Wed, 2 Sep 1992 11:30:44 GMT
  11. Lines: 29
  12.  
  13. jwwalden@miavx1.acs.muohio.edu (P'relan) writes:
  14.  
  15. >I have a bit of a problem with some code I'm working on, and hope someone on
  16. >the net could help.  It seems that either I'm doing something wrong, or that
  17. >asl.library's FreeGadgets() function is causing an Enforcer hit.  Here is the
  18. >function in question:
  19.  
  20. >void FreeWindow(struct Window *wind) {
  21.  
  22. >struct Menu *men;
  23. >struct Gadget *glist;
  24.  
  25. >men = wind->MenuStrip;
  26. >glist = wind->FirstGadget;
  27.  
  28. >if (men) {
  29. >        ClearMenuStrip(wind);
  30. >        FreeMenus(men);
  31. >        }
  32. >CloseWindow(wind);
  33. >if (glist) FreeGadgets(glist);   <----- This line causes hit.
  34. >}
  35.  
  36. You MUST call FreeGadgets() on the pointer returned by CreateContext().
  37. You possibly call FreeGadgets() on one of the already deleted system
  38. gadgets.
  39. -- 
  40. Matthias Scheler                                         tron@uni-paderborn.de
  41. University of Paderborn (Germany)
  42.