comp.lang.ada
 help / color / mirror / Atom feed
From: Achim Gerhard <achim_g@my-deja.com>
Subject: Re: Create-Delete tmp Files
Date: 2000/03/24
Date: 2000-03-24T00:00:00+00:00	[thread overview]
Message-ID: <8bfd8b$6g6$1@nnrp1.deja.com> (raw)
In-Reply-To: 8bdcb6$tmo$1@nnrp1.deja.com

In article <8bdcb6$tmo$1@nnrp1.deja.com>,
Robert Dewar <robert_dewar@my-deja.com> wrote:
> In article <8bcmds$6e9$1@nnrp1.deja.com>,
> Achim Gerhard <achim_g@my-deja.com> wrote:
>
> > with Text_IO;
> > procedure IO_Test
> > is
> > the_file : Text_IO.File_Type;
> > begin
> > for i in integer range 1 .. 100_000 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;
> > end IO_Test;
> > Regards,
> > Achim
>
> Actually it does not surprise me one bit that this leaks. When
> you use temporary files, they have the semantics that they are
> automatically deleted at the end of the run. It is quite
> expected that the runtime (either at the Ada level and/or
> the OS level) will maintain some data structures for ensuring
> that this deletion takes place.
>
> It is rather odd style to explicitly delete such files, so it
> is not surprising that the data structures are not cleaned up
> to take account of this.
I do not agree. If the implementation does not support deletion in this
case, I would expect, that a call to DELETE will raise the exception
USE_ERROR.
Also, a explicit call of DELETE does not contradict with the clean up
during the completion of the main program.
Regards,
Achim
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
--
_ _
/A/G
--
_ _
/A/G


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




  reply	other threads:[~2000-03-24  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 ` Robert Dewar
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       ` 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       ` 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 [this message]
2000-03-24  0:00                   ` Robert Dewar
2000-03-20  0:00       ` Robert A Duff
2000-03-20  0:00         ` Achim Gerhard
2000-03-20  0:00           ` Robert A Duff
replies disabled

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