|
From: Grein, Christoph (Fa. ESG) on 29 Jan 2008 06:06 Dmitry wrote: > In my understanding Deallocate is just not called. One can enforce this > behavior when there is GC by applying the pragma Controlled, but not the > reverse. No, just the reverse, pragma Controlled prevents automatic garbage collection, see RM 13.11.3(1). Eurocopter Deutschland GmbH Sitz der Gesellschaft/Registered Office: Donauwoerth Registergericht/Registration Court: Amtsgericht Augsburg HRB 16508 Vorsitzender des Aufsichtsrates/Chairman of the Supervisory Board: Dr. Lutz Bertling Geschaeftsfuehrung/Board of Management: Dr. Wolfgang Schoder, Vorsitzender/CEO; Friedrich-Wilhelm Hormel; Ralf Barnscheidt CONFIDENTIALITY NOTICE This communication and the information it contains is intended for the addressee(s) named above and for no other persons or organizations. It is confidential and may be legally privileged and protected by law. The unauthorized use, copying or disclosure of this communication or any part of it is prohibited and may be unlawful. If you have received this communication in error, kindly notify us by return e-mail and discard and/or delete the communication. Thank you very much. It is possible for e-mails to be intercepted or affected by viruses. Whilst we maintain virus checks on our e-mails, we accept no liability for viruses or other material which might be introduced with this message.
From: Maciej Sobczak on 29 Jan 2008 06:12 On 29 Sty, 01:41, Robert A Duff <bobd...(a)shell01.TheWorld.com> wrote: > Finalization of heap objects happens when you do > Unchecked_Deallocation. In addition, when an access type goes > out of scope, all remaining objects (the ones you did not > Unchecked_Deallocate) are finalized in an arbitrary order, > but this does not free the memory. [...] > In implementation terms, each finalizable heap object is > chained onto a doubly-linked list. U_D removes the object > from the list, finalizes it, and frees the memory. > When the access type goes out of scope, the implementation > walks down the list and finalizes everything on it. [...] This, and the replies from Adam and Dmitry give me the complete picture of how it works. Thanks for the explanation. -- Maciej Sobczak * www.msobczak.com * www.inspirel.com
From: Dmitry A. Kazakov on 29 Jan 2008 07:50 On Tue, 29 Jan 2008 12:06:19 +0100, Grein, Christoph (Fa. ESG) wrote: > Dmitry wrote: >> In my understanding Deallocate is just not called. One can enforce this >> behavior when there is GC by applying the pragma Controlled, but not the >> reverse. > > No, just the reverse, pragma Controlled prevents automatic garbage > collection, see RM 13.11.3(1). Yes, that is what I meant type My_Type_Ptr is access ...; pragma Controlled (My_Type_Ptr); -- No Deallocate ever implicitly called Without the pragma it isn't called anyway, but it could be if there were GC present. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de
|
Pages: 1 Prev: Interfaces and private types Next: Problème avec des with |