finalisation

Craig Latta craig at netjam.org
Thu Jan 22 22:32:49 UTC 2004


> > > FileStream class>>fileNamed: fileName do: aBlock
> > >      |file|
> > >      file := self fileNamed: fileName.
> > >      [aBlock value: file] ensure: file close
>
> Actually, it would be better with a ^ in front of the last line...

	It should also do the creation inside the ensured block. As it is, the
process running the code could get stopped before the ensured block is
evaluated, leaving the file dangling.


-C

--
Craig Latta
improvisational musical informaticist
craig at netjam.org
www.netjam.org
[|] Proceed for Truth!




More information about the Squeak-dev mailing list