comp.lang.ada
 help / color / mirror / Atom feed
From: Matthew Heaney <matthew_heaney@acm.org>
Subject: Re: How do functions return unbounded arrays?
Date: 1998/06/17
Date: 1998-06-17T00:00:00+00:00	[thread overview]
Message-ID: <m3ium0yi4r.fsf@mheaney.ni.net> (raw)
In-Reply-To: 35865075.9D7DCBD@cl.cam.ac.uk


Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk> writes:

> Thanks for that example. That is exactly an implementation of
> of my bad gut feeling about the lack of a clear description in
> the RM that guarantees me when these secretly allocated heap
> blocks will be deallocated. Some guarantee that whatever a variable
> length function return secretly allocates does not survive the next
> semicolon would be very reassuring, otherwise programmers have
> little idea about what memory leaks their code might contain and
> this could be a safety risk. 

As I pointed out in my previous post, there needs to be an inner block,
containing the declaration of string S.  This will probably take care of
the memory "problem."







  parent reply	other threads:[~1998-06-17  0:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-14  0:00 How do functions return unbounded arrays? Markus Kuhn
1998-06-14  0:00 ` Robert A Duff
1998-06-15  0:00 ` John Herro
1998-06-17  0:00   ` Mark D. McKinney
     [not found]   ` <35865075.9D7DCBD@cl.cam.ac.uk>
1998-06-17  0:00     ` Matthew Heaney [this message]
1998-06-21  0:00       ` Robert Dewar
1998-06-17  0:00     ` Gavin Finnie
1998-06-17  0:00       ` Rod Chapman
1998-06-21  0:00         ` Robert Dewar
1998-06-21  0:00         ` Robert Dewar
1998-06-21  0:00       ` Robert Dewar
1998-06-18  0:00     ` Mats Weber
1998-06-21  0:00       ` Robert Dewar
1998-06-17  0:00   ` Matthew Heaney
1998-06-21  0:00   ` Robert Dewar
replies disabled

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