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-Thread: 103376,6b1a1ed8b075945 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!w3g2000hsg.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Allocators and exceptions Date: Wed, 12 Sep 2007 14:01:04 -0700 Organization: http://groups.google.com Message-ID: <1189630864.718247.271770@w3g2000hsg.googlegroups.com> References: <1189323618.588340.87180@o80g2000hse.googlegroups.com> <1189524788.300591.312380@w3g2000hsg.googlegroups.com> <1189547814.740732.220140@x40g2000prg.googlegroups.com> <1189599757.106695.147440@57g2000hsv.googlegroups.com> <1189613298.182273.23310@22g2000hsm.googlegroups.com> <1bi8swgas8pjl$.1tr7pfyemom8q.dlg@40tude.net> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1189630866 30825 127.0.0.1 (12 Sep 2007 21:01:06 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 12 Sep 2007 21:01:06 +0000 (UTC) In-Reply-To: <1bi8swgas8pjl$.1tr7pfyemom8q.dlg@40tude.net> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: w3g2000hsg.googlegroups.com; posting-host=66.126.103.122; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news2.google.com comp.lang.ada:1919 Date: 2007-09-12T14:01:04-07:00 List-Id: On Sep 12, 1:35 pm, "Dmitry A. Kazakov" wrote: > On Wed, 12 Sep 2007 09:08:18 -0700, Adam Beneschan wrote: > > By the way, although I think having the language deallocate the object > > automatically is a bad idea, > > How to reconcile this with: > > 1. objects allocated on the stack > > 2. all sorts of temporal objects the compiler is allowed to create (and > thus allocate somehow, somewhere) > > 3. a permission given to collect garbage? There's nothing to reconcile, because I didn't say that the language should never deallocate *any* object automatically; I think you'd have to take my sentence out of context to read it that way. In the particular case we're discussing on this thread, my objection is that I'm not convinced a dangling pointer couldn't be created (by using "normal" features of the language, not Unchecked features). By contrast, the language rules do prevent this in cases #1 and #2: in case #1, by the accessibility rules; in case #2, I think it's because only for limited types can you take the 'Access of the "current instance", and the build-in-place rules ensure that anonymous objects aren't created for limited types. For #3, a working garbage collector by definition won't deallocate anything that isn't pointed to. -- Adam