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,b307bd75c8071241 X-Google-Attributes: gid103376,public From: Marinus van der Lugt Subject: Re: newbie Q: storage management Date: 1997/04/30 Message-ID: <33673929.F5D@space-elec.dofn.de>#1/1 X-Deja-AN: 238404113 References: <5k5hif$7r5@bcrkh13.bnr.ca> Organization: Dornier Satellitensysteme GmbH Newsgroups: comp.lang.ada Date: 1997-04-30T00:00:00+00:00 List-Id: Kaz Kylheku wrote: > Whose responsibility is it to destroy these objects? The Ada 95 standard It is the programmers resposibility. > says that an implementation is permitted to implement garbage collection, > but not required to do so. Garbage collection is the process that concatenates already deallocated area's into one big area so memory does not get fragmented. > I know that it is possible to instantiate a generic freeing function for > explicitly destroying objects. But why is there is this lack of symmetry in the > language? On the one hand, you have a slick ``new''-expression to create > objects, but the complementary deletion operation is totally obscured. Does Well, everybody is entitled to his or hers opinion. > this mean that explicit freeing of objects via an instance of > Unchecked_Deallocation is discouraged (due to the potential creation of No. I don't know why it is called 'unchecked'_deallocation, but maybe it is done so you know that _YOU_ are responsible. > dangling references)? Is it the reponsibility of the language implementation to > automagically detect when an object is no longer reachable and do the > appropriate deallocation, even if garbage is not collected? No, see above. Hope this helps, Rien