comp.lang.ada
 help / color / mirror / Atom feed
From: "Christoph Karl Walter Grein" <AdaMagica@web.de>
To: comp.lang.ada@ada-france.org
Subject: Re: Ada memory management?
Date: Thu, 07 Oct 2004 13:15:58 +0200
Date: 2004-10-07T13:15:58+02:00	[thread overview]
Message-ID: <mailman.233.1097147788.390.comp.lang.ada@ada-france.org> (raw)

Stephen Thomas:
> > 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!
> 
> Actually, no it shouldn't, not on a halfway-decent implementation.
> Logically speaking, a storage pool for items accessed via values of
> an access type has the same lifetime as the access type itself. In
> the above example, a new storage pool for Int_Ptr is created on
> entry to Does_This_Leak, and is removed on exit.

RM 13.11(17) If Storage_Pool is not specified ... then the implementation chooses a standard storage pool .. in an implementation-defined manner.

So how do you arrive at this statement?

But see RM 13.11(18): The case is different if a Storage_Size is defined.
__________________________________________________________
Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.
weltweit telefonieren! http://freephone.web.de/?mc=021201




             reply	other threads:[~2004-10-07 11:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-07 11:15 Christoph Karl Walter Grein [this message]
2004-10-07 12:01 ` Ada memory management? Stephen Thomas
  -- strict thread matches above, loose matches on Subject: below --
2004-10-07 11:31 Christoph Karl Walter Grein
2004-10-07 10:00 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
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