home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.ada
- Path: sparky!uunet!cis.ohio-state.edu!news.sei.cmu.edu!ajpo.sei.cmu.edu!falis
- From: falis@ajpo.sei.cmu.edu (Edward Falis)
- Subject: Re: Are strings automatically free'd?
- Message-ID: <1992Aug12.134913.8209@sei.cmu.edu>
- Summary: It depends on the implementation
- Keywords: Automatic storage reclamation
- Sender: Ed Falis
- Organization: Alsys
- References: <1992Aug10.203315.26724@nsisrv.gsfc.nasa.gov>
- Date: Wed, 12 Aug 1992 13:49:13 GMT
- Lines: 23
-
- The short answer is that this will be implementation dependent, so ask
- your vendor.
-
- In most cases, there either won't be automatic reclamation, or the reclamation
- will be tied to the scope where the access type is defined (not where the
- allocator is executed). In that scenario, all allocated objects would be
- reclaimed at exit of the scope defining the access type (one way of
- implementing pragma CONTROLLED).
-
- This seems not ot be the case in your example code, so you ought to use
- unchecked deallocation, which is more likely to work across the various
- implementations you're looking at. The final caveat is to (once again)
- taslk to your vendor, since there are implementations where unchecked
- deallocation is either deferred, or simply not done.
-
- For the Alsys implementations, the allocated objects are reclaimed when
- the scope defining the access type is exited, and unchecked deallocation
- reclaims immediately.
-
- - Ed Falis, Alsys
-
-
-
-