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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!fx23.iad.POSTED!not-for-mail From: Hubert User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Stupid Question but it bothers me Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 150119-0, 01/19/2015), Outbound message X-Antivirus-Status: Clean Message-ID: <6Tgvw.1229422$Rp.389422@fx23.iad> X-Complaints-To: abuse@newsdemon.com NNTP-Posting-Date: Mon, 19 Jan 2015 23:58:58 UTC Organization: http://www.NewsDemon.com Date: Mon, 19 Jan 2015 15:58:58 -0800 X-Received-Bytes: 1761 X-Received-Body-CRC: 2659203699 Xref: news.eternal-september.org comp.lang.ada:24614 Date: 2015-01-19T15:58:58-08:00 List-Id: Yes, sorry I am sure this is a stupid question but I can not remember that I read an answer to it in Barne's book. suppose you have simple record TYPE A_Type IS RECORD My_Map : ; END RECORD; now when I allocate a record with NEW obviously the map is correctly initialized. What happens when I deallocate the record with an instantiation of Ada.Unchecked_Deallocate? is the map correctly destroyed or do I have to revive my record from Ada.Finalization? I mean there is no obvious memory leak detector in Ada so I am always a bit blind (on C++ I usually use VisualLeakDetector). I assume, when I store access values in the map I will have to go through all entries and deallocate them one by one which is fine, but my question is about the map and it's internal datastructures. Will the deallocation automatically deallocate elements like the map as well? Thanks --- This email has been checked for viruses by Avast antivirus software. http://www.avast.com