comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison <dennison@telepath.com>
Subject: Re: how do i include 111111 in an enumaration type ?
Date: 1999/10/12
Date: 1999-10-12T00:00:00+00:00	[thread overview]
Message-ID: <7tvpd6$1mg$1@nnrp1.deja.com> (raw)
In-Reply-To: slrn806iq2.1nn.lutz@taranis.iks-jena.de

In article <slrn806iq2.1nn.lutz@taranis.iks-jena.de>,
  lutz@iks-jena.de (Lutz Donnerhacke) wrote:
> * Matthew Heaney wrote:
> >Your code segment is completely wrong.  Do not use raw access types.
> >Use Unbounded_String, which does automatic garbage collection.
>
> I thougt (by reading the RM95), that only explizit calls of
> Unchecked_Access or (Unchecked_)Free can cause a memory leakage. I
> assumed automatic garbage collecting to every ordinary use of access
> and new.

Whoa! I don't nessecarily agree with Matt's sentiment, but what you just
answered with is completely wrong.

   o   The only way to get memory leaks is to *not* deallocate allocated
memory. Explicit deallocations can be dangerous for other reasons, but
they cannot cause leaks.
   o   Almost no Ada compilers provide automatic garbage collection. I
don't know of *any* that do it that don't target the JVM.

Thus following your logic to avoid memory leaks is one sure way to give
yourself memory leaks!

--
T.E.D.


Sent via Deja.com http://www.deja.com/
Before you buy.




  parent reply	other threads:[~1999-10-12  0:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7tsq3o$92p$1@minus.oleane.net>
     [not found] ` <38021792_4@news1.prserv.net>
     [not found]   ` <slrn80495c.2a2.aidan@skinner.demon.co.uk>
1999-10-11  0:00     ` how do i include 111111 in an enumaration type ? Keith Thompson
1999-10-12  0:00   ` Sybs ALHABSHI
1999-10-12  0:00     ` Lutz Donnerhacke
1999-10-12  0:00       ` Matthew Heaney
1999-10-12  0:00         ` Lutz Donnerhacke
1999-10-12  0:00           ` Ted Dennison
1999-10-12  0:00           ` Ted Dennison [this message]
1999-10-13  0:00             ` Lutz Donnerhacke
1999-10-13  0:00               ` Matthew Heaney
1999-10-13  0:00                 ` Ted Dennison
1999-10-12  0:00     ` Matthew Heaney
1999-10-12  0:00       ` Ehud Lamm
1999-10-12  0:00 ` Nick Roberts
1999-10-14  0:00   ` Sybs ALHABSHI
replies disabled

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