home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / amiga / programm / 18589 < prev    next >
Encoding:
Internet Message Format  |  1993-01-12  |  1.3 KB

  1. Path: sparky!uunet!psinntp!tfd!afp!gna!amipb.gna.org!amipb
  2. From: amipb@amipb.gna.org (Philippe Berard)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Flushing unused devices out of ram , how ?
  5. Distribution: world
  6. Message-ID: <amipb.067x@amipb.gna.org>
  7. X-NewsSoftware: GRn 1.16f (10.17.92) by Mike Schwartz & Michael B. Smith
  8. Date: 11 Jan 93 14:45:01 MET
  9. Organization: IWANIMA
  10. Lines: 21
  11.  
  12. In article <1993Jan6.104949.20894@philips.oz.au> gduncan@philips.oz.au (Gary Duncan) writes:
  13. > Currently in a C-program I've done a :-
  14. > Execute  ("Avail Flush >nil:", 0,0);
  15. >
  16. >     which does the job but its a bit klugey.
  17. >
  18. > Why do I want to do this? Simply that if you open a device (for
  19. > the first time ) then close it, it hangs around unused in RAM
  20. > giving the impression of a memory leak.
  21.  
  22.     You must use an AllocMem(-1, MEMF_PUBLIC), this will flush all libraries
  23.     and devices with an OpenCount set to 0.
  24.  
  25.     Sincerely,
  26.                                    -- Philippe
  27.  
  28. .----------------------------------------------------------------------------.
  29. |  Philippe Berard  (French Amiga User)       |                              |
  30. |  "They hold a cup of wisdom,                | UseNet : amipb@amipb.gna.org |
  31. |   But there is nothing within" (Kate Bush). |                              |
  32. `----------------------------------------------------------------------------'
  33.