From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,13d6cd0af0d0d769 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-22 12:04:11 PST Path: nntp.gmd.de!stern.fokus.gmd.de!ceres.fokus.gmd.de!zib-berlin.de!fu-berlin.de!news.dfn.de!RRZ.Uni-Koeln.DE!news.rhrz.uni-bonn.de!news.uni-stuttgart.de!rz.uni-karlsruhe.de!xlink.net!howland.reston.ans.net!cs.utexas.edu!news.ti.com!news.dseg.ti.com!amber.dseg.ti.com!fjm From: fjm@ti.com (Fred J. McCall) Newsgroups: comp.lang.ada Subject: Re: Does memory leak? Date: Wed, 22 Mar 1995 12:04:11 Organization: Texas Instruments, Inc. Distribution: world Message-ID: References: <3kopao$ekg@nef.ens.fr> NNTP-Posting-Host: amber.dseg.ti.com X-Newsreader: Trumpet for Windows [Version 1.0 Rev A] Date: 1995-03-22T12:04:11+00:00 List-Id: In article <3kopao$ekg@nef.ens.fr> sands@clipper.ens.fr (Duncan Sands) writes: >Does Ada leak memory? I would like to believe it doesn't, but >how does it manage not to (without having to use unchecked >deallocation)? Unless you use unchecked deallocation, there is no guarantee that Ada will clean up your memory. It is *allowed* to, but isn't required to (from my reading of the Ada83 Standard, anyway). I had *thought* that even Unchecked_Deallocation wouldn't guarantee that it was released, but it looks like it does. The Standard is worded somewhat ambiguously in this case, since it says that the result of doing an Unchecked_Deallocation is an *indication* that the storage should be reclaimed, but does not seem to guarantee that the Ada runtime system will do anything about that indication. [Hence, if we assume that Unchecked_Deallocation really does mean that the memory is recovered (rather than merely indicating that it should be), it is *designers* who leak memory, not Ada. What day is it, again?]