comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: Ada memory management?
Date: Thu, 07 Oct 2004 14:00:06 +0200
Date: 2004-10-07T14:00:06+02:00	[thread overview]
Message-ID: <9541380.RCQ7KlNpmy@linux1.krischik.com> (raw)
In-Reply-To: mailman.232.1097143279.390.comp.lang.ada@ada-france.org

Christoph Karl Walter Grein wrote:

> procedure Does_This_Leak is
>     type Int_Ptr is access Integer;
>     ptr: Int_Ptr;
> begin
>     ptr := new Integer;
> end Does_This_Leak;
> 
> Of course this leaks, and imagine how much!

Well depends if garbage collection is available. The sad news are that only
Ada's targeting JVM have garbage collection.
 
> Consider Ada.Unchecked_Deallocation. It's called Unchecked because it's
> your very chore to take care of not producing dangling pointers.

Or using a garbage collected storrage pool.

With Regards

Martin

-- 
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com




  parent reply	other threads:[~2004-10-07 12:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-07 10:00 Ada memory management? Christoph Karl Walter Grein
2004-10-07 10:41 ` Stephen Thomas
2004-10-07 11:17   ` Jeff C r e e.m
2004-10-07 14:22   ` Georg Bauhaus
2004-10-07 14:51     ` Stephen Thomas
2004-10-07 16:23     ` Larry Kilgallen
2004-10-07 18:35       ` Frank J. Lhota
2004-10-07 12:00 ` Martin Krischik [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-10-07 11:31 Christoph Karl Walter Grein
2004-10-07 11:15 Christoph Karl Walter Grein
2004-10-07 12:01 ` Stephen Thomas
2004-10-07  9:39 matthias_k
2004-10-07 12:06 ` Martin Krischik
2004-10-07 17:24 ` Nick Roberts
2004-10-07 19:04   ` Luke A. Guest
replies disabled

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