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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,902bff0abea1083d,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news2.volia.net!feeder.news.tin.it!spool.news.tin.it!not-for-mail Message-Id: <44c7c3d3$0$47958$4fafbaef@reader3.news.tin.it> From: fabio de francesco Subject: Why people wants to complicate code with Ada.Unchecked_Deallocation? Newsgroups: comp.lang.ada Date: Wed, 26 Jul 2006 21:34:46 +0200 User-Agent: KNode/0.10.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit Organization: TIN.IT (http://www.tin.it) X-Comments: Please send technical notifications to newsmaster@tin.it NNTP-Posting-Host: 87.3.111.78 X-Trace: 1153942484 reader3.news.tin.it 47958 87.3.111.78:52699 X-Complaints-To: Please send abuse reports to abuse@tin.it Xref: g2news2.google.com comp.lang.ada:5948 Date: 2006-07-26T21:34:46+02:00 List-Id: Hi all. The following statement is from Cohen's "Ada as a second language": "Ada.Unchecked_Deallocation must be used with caution. As we shall see, it can lead to subtle but devastating errors. If storage for allocated object is plentiful, there is no point in complicating the program to keep track of which allocated objects are no longer needed". Does it mean that, for safety sake, programmers should not care about memory consumption? I am not sure I can agree with that. I've been tought that any "malloc" and "new" must be followed by "free" and "delete". What do you think about this issue? fabio de francesco