From: Achim Gerhard <achim_g@my-deja.com>
Subject: Re: Create-Delete tmp Files
Date: 2000/03/20
Date: 2000-03-20T00:00:00+00:00 [thread overview]
Message-ID: <8b5d8c$cri$1@nnrp1.deja.com> (raw)
In-Reply-To: wcczortzqw8.fsf@world.std.com
In article <wcczortzqw8.fsf@world.std.com>,
Robert A Duff <bobduff@world.std.com> wrote:
> Achim Gerhard <achim_g@my-deja.com> writes:
>
> > The question is:
> > is these legal Ada code?
>
> By the way, "legal" is a compile-time thing in Ada, which isn't what
you
> mean here.
Excuse my bad English. What would you say?
>
> > loop
> > Text_IO.Create ( File => the_file, Mode => Text_IO.OUT_File );
> > Text_IO.Reset ( File => the_file, Mode => Text_IO.IN_File );
> > Text_IO.Delete ( File => the_file );
> > end loop;
> > And the question behind that is:
> > Why does this code cause the Ada runtime to accumulate memory?
>
> Because you didn't Close the file.
From LRM, A.8.2 File Management
12 procedure Delete(File : in out File_Type);
13 Deletes the external file associated with the given file.
The given file is closed, and the external file ceases to exist.
^^^^^^^^^
14 The exception Status_Error is propagated if the given file is
not open. The exception Use_Error is propagated if deletion of
the external file is not supported by the external environment.
BTW: I still use Ada83 but that's almost the same in this case
Regards
Achim
>
> - Bob
>
--
_ _
/A/G
Sent via Deja.com http://www.deja.com/
Before you buy.
next prev parent reply other threads:[~2000-03-20 0:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-17 0:00 Create-Delete tmp Files Achim Gerhard
2000-03-17 0:00 ` John J Cupak Jr
2000-03-18 0:00 ` Robert Dewar
2000-03-20 0:00 ` Achim Gerhard
2000-03-20 0:00 ` tmoran
2000-03-21 0:00 ` Achim Gerhard
2000-03-21 0:00 ` Robert Dewar
2000-03-21 0:00 ` Roger Barnett
2000-03-23 0:00 ` Achim Gerhard
2000-03-23 0:00 ` tmoran
2000-03-23 0:00 ` Robert Dewar
2000-03-24 0:00 ` Achim Gerhard
2000-03-24 0:00 ` Robert Dewar
2000-03-20 0:00 ` Gautier
2000-03-20 0:00 ` Preben Randhol
2000-03-20 0:00 ` Gautier
2000-03-20 0:00 ` Preben Randhol
2000-03-20 0:00 ` Robert A Duff
2000-03-20 0:00 ` Achim Gerhard [this message]
2000-03-20 0:00 ` Robert A Duff
2000-03-17 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