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.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HEADER_SPAM autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc772,b30bd69fa8f63cb2 X-Google-Attributes: gidfc772,public X-Google-Thread: 103376,b30bd69fa8f63cb2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-18 06:50:41 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!uwm.edu!rpi!not-for-mail From: Hyman Rosen Newsgroups: comp.lang.ada,comp.lang.c++.moderated Subject: Re: C bug of the day Date: 18 Jun 2003 09:52:55 -0400 Organization: unknown Sender: cppmods@netlab.cs.rpi.edu Message-ID: <7RQHa.3141$Uh2.339@nwrdny01.gnilink.net> References: <1054751321.434656@master.nyc.kbcfp.com> <7gBHa.12174$KF1.273806@amstwist00> NNTP-Posting-Host: netlab.cs.rpi.edu X-Original-Date: Wed, 18 Jun 2003 03:17:23 GMT X-Submission-Address: c++-submit@netlab.cs.rpi.edu X-Auth: PGPMoose V1.1 PGP comp.lang.c++.moderated iQBVAwUAPvBus0HMCo9UcraBAQF3CwH/b4PRX6IwhsDdeC9nZGKfzmzFjfBDfQ6q nSh/dW0Gk7uKKMz9b0aHcTV3mXsb42z5r4umvybVhrOWodN4hyPWQA== =PUT5 Xref: archiver1.google.com comp.lang.ada:39390 comp.lang.c++.moderated:68602 Date: 2003-06-18T09:52:55-04:00 List-Id: Wesley Groleau wrote: > That's what's nice about Ada controlled types. > You can use them for anything with mandatory finalization, > not just GC. I suppose C++ destructors could do the same. Of course, and much more easily, since C++ destructors do not require inheritance from a special class like Ada's controlled types, and classes with destructors can be declared in any scope, not just at library level. [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ]