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,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3ccb707f4c91a5f2 X-Google-Attributes: gid103376,public From: kst@thomsoft.com (Keith Thompson) Subject: Re: Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation) Date: 1996/10/14 Message-ID: #1/1 X-Deja-AN: 189376792 sender: news@thomsoft.com (USENET News Admin @flash) x-nntp-posting-host: pulsar references: <325BC3B3.41C6@hso.link.com> <325D7F9B.2A8B@gte.net> <325E452E.265C@gsfc.nasa.gov> <325E9110.1D16@gte.net> <326003FC.2038@gte.net> organization: Thomson Software Products, San Diego, CA, USA newsgroups: comp.lang.ada originator: kst@pulsar Date: 1996-10-14T00:00:00+00:00 List-Id: In <326003FC.2038@gte.net> Dave writes: > Garbage reduction works like this: When a type goes out of scope, > all instances of that type are deleted. Neither the Ada RM nor any other literature I've seen uses the term "garbage reduction" in this context. A web search for the phrase turned up 6 references, all of them having to do with trash collection. This may explain why people are confused by your use of the term. In any case, it's not true that all instances (objects) of a type are necessarily deleted when a type goes out of scope. In practice, an object created by a declaration, either as a standalone object or as a (sub)component of another standalone object, will almost always be deallocated on exit from the scope declaring the object; if the scope is a declare block, the deallocation may wait until exit from the enclosing subprogram. An object created by an allocator may or may not be deallocated on exit from the scope declaring the access type. None of this is mandated by the language. > Actually, Ada95 provides a pragma (pragma Controlled) to turn off garbage > collection. If the programmer can turn garbage collection on or off it is > transparent only if the programmer wants it to be. Note that pragma Controlled has no effect for systems that don't provide automatic garbage collection. What "transparent" means is that the visible behavior of most programs will be the same whether garbage collection is provided or not. -- Keith Thompson (The_Other_Keith) kst@thomsoft.com <*> TeleSoft^H^H^H^H^H^H^H^H Alsys^H^H^H^H^H Thomson Software Products 10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2706 FIJAGDWOL