comp.lang.ada
 help / color / mirror / Atom feed
From: fabio de francesco <cancella.fabiomdf@alice.elimina.it>
Subject: Why people wants to complicate code with Ada.Unchecked_Deallocation?
Date: Wed, 26 Jul 2006 21:34:46 +0200
Date: 2006-07-26T21:34:46+02:00	[thread overview]
Message-ID: <44c7c3d3$0$47958$4fafbaef@reader3.news.tin.it> (raw)

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




             reply	other threads:[~2006-07-26 19:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-26 19:34 fabio de francesco [this message]
2006-07-26 19:51 ` Why people wants to complicate code with Ada.Unchecked_Deallocation? Georg Bauhaus
2006-07-26 19:56 ` Simon Wright
2006-07-26 21:28 ` Jeffrey R. Carter
2006-07-27 15:49   ` adaworks
2006-07-27 19:11     ` Jeffrey R. Carter
2006-07-27 22:52     ` Simon Wright
2006-07-27 23:28       ` Robert A Duff
2006-07-27  0:07 ` Peter C. Chapin
2006-07-27 11:54 ` gautier_niouzes
replies disabled

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