home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / programm / 13202 < prev    next >
Encoding:
Internet Message Format  |  1992-07-30  |  1.7 KB

  1. Path: sparky!uunet!olivea!apple!mumbo.apple.com!apple!dierks
  2. From: absurd@applelink.apple.com (Tim Dierks, software saboteur)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: Repeated GetCIcon/PlotCIcon calls
  5. Message-ID: <absurd-280792170546@dierks.apple.com>
  6. Date: 29 Jul 92 00:09:18 GMT
  7. References: <m0m7vfN-000FO0C@bagpipe.reed.edu> <36915@unix.SRI.COM> <1992Jul16.234146.41639@kuhub.cc.ukans.edu>
  8. Sender: usenet@Apple.COM
  9. Followup-To: comp.sys.mac.programmer
  10. Organization: MacDTS Misfits
  11. Lines: 26
  12.  
  13. In article <1992Jul16.234146.41639@kuhub.cc.ukans.edu>,
  14. ozma@kuhub.cc.ukans.edu wrote:
  15. > In article <36915@unix.SRI.COM>, mxmora@unix.SRI.COM (Matt Mora) writes:
  16. > > In article <m0m7vfN-000FO0C@bagpipe.reed.edu> bagpipe@reed.edu!bagpipe.reed.edu!pcalahan (Patrick John Calahan) writes:
  17. > > 
  18. > >>IMV says that you shouldn't call PlotCICon before each GetCIcon because
  19. > >>it overhead will build up in the resource map.  Makes sense to me...that  
  20. > >>seems to be happenening when my system crashes after plotting some number  
  21. > >>of icons...
  22. > > You could mark them purgeable. But I don't think that really works. I think
  23. > > there is a bug with cicns or something because I tried to get rid of the
  24. > > memory but it would still fill up the heap. I'm using ploticonid now
  25. > > (tech note #30x) and it works fine. 
  26. > I believe ReleaseResource() after every PlotCIcon will do the trick.
  27. Actually, the appropriate call is DisposCIcon(), which will dispose of all
  28. the various handles associated with a color icon.  ReleaseResource() would
  29. not release all the handles; in fact, I think it would be in error, because
  30. I'm pretty sure that a CIconHandle in memory is not a resource handle; it's
  31. constructed from one.
  32.  
  33. Tim Dierks
  34. MacDTS, but I speak for the trees
  35.