home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / ada / 2350 next >
Encoding:
Text File  |  1992-08-12  |  1.4 KB  |  37 lines

  1. Newsgroups: comp.lang.ada
  2. Path: sparky!uunet!cis.ohio-state.edu!news.sei.cmu.edu!ajpo.sei.cmu.edu!falis
  3. From: falis@ajpo.sei.cmu.edu (Edward Falis)
  4. Subject: Re: Are strings automatically free'd?
  5. Message-ID: <1992Aug12.134913.8209@sei.cmu.edu>
  6. Summary: It depends on the implementation
  7. Keywords: Automatic storage reclamation
  8. Sender: Ed Falis
  9. Organization: Alsys
  10. References: <1992Aug10.203315.26724@nsisrv.gsfc.nasa.gov>
  11. Date: Wed, 12 Aug 1992 13:49:13 GMT
  12. Lines: 23
  13.  
  14. The short answer is that this will be implementation dependent, so ask 
  15. your vendor.
  16.  
  17. In most cases, there either won't be automatic reclamation, or the reclamation
  18. will be tied to the scope where the access type is defined (not where the
  19. allocator is executed).  In that scenario, all allocated objects would be
  20. reclaimed at exit of the scope defining the access type (one way of 
  21. implementing pragma CONTROLLED).
  22.  
  23. This seems not ot be the case in your example code, so you ought to use
  24. unchecked deallocation, which is more likely to work across the various
  25. implementations you're looking at.  The final caveat is to (once again)
  26. taslk to your vendor, since there are implementations where unchecked
  27. deallocation is either deferred, or simply not done.
  28.  
  29. For the Alsys implementations, the allocated objects are reclaimed when
  30. the scope defining the access type is exited, and unchecked deallocation
  31. reclaims immediately.
  32.  
  33. - Ed Falis, Alsys
  34.  
  35.  
  36.  
  37.