comp.lang.ada
 help / color / mirror / Atom feed
* Stupid Question but it bothers me
@ 2015-01-19 23:58 Hubert
  2015-01-20  0:24 ` sbelmont700
  2015-01-20  3:00 ` David Botton
  0 siblings, 2 replies; 12+ messages in thread
From: Hubert @ 2015-01-19 23:58 UTC (permalink / raw)


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 : <instantiated Ada.Containers.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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-01-20  8:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-19 23:58 Stupid Question but it bothers me Hubert
2015-01-20  0:24 ` sbelmont700
2015-01-20  1:24   ` Hubert
2015-01-20  2:58     ` David Botton
2015-01-20  4:27       ` Hubert
2015-01-20  4:54         ` David Botton
2015-01-20  4:55     ` Jeffrey Carter
2015-01-20  8:20       ` Simon Wright
2015-01-20  3:00 ` David Botton
2015-01-20  4:29   ` Hubert
2015-01-20  4:56     ` David Botton
2015-01-20  5:06       ` Hubert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox