ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey N. Solofnenko" <>
Subject Re: Pb with <unzip>+<trycatch>+<delete>
Date Tue, 16 Mar 2004 19:32:40 GMT
I have had such problems with still open files and every time I thought 
it was a JDK bug, but later by adding try/finally with close() I fixed 
it. gc() is usually needed when somebody forgets to close a stream (and 
there was just such bug in ANT about not closing a stream and I think it 
was in 1.6.0 too). While there are bugs in JDK, I do not think we should 
blame it first.

- Alexey.

Dominique Devienne wrote:

>>From: Matt Benson []
>>>Nope, I'm running 1.6.0. But it's always scary to me
>>>when one needs
>>>System.gc() in ones code... As we all know, this
>>Dominique:  please believe that I hated to add this to
>>the code.  Unfortunately, IT WORKS.  If you search the
>>lists you will find that I said when I added it that I
>>didn't want to believe it was true...  Another place
>>that would have achieved a similar effect would be on
>>LazyFileOutputStream.close(), since most files created
>>by Ant are created this way... it's just something to
>>do with Windows JVMs not properly releasing file
>>handles or something until after gc, best I can tell...
>Don't get me wrong Matt, no question what you're doing is
>the right thing, since it fixes real problems. But I always
>hate it when we litter our code with turn arounds for bugs.
>No other solution here, but I wish SUN would fix their VMs
>instead ;-) All 1.{1|2|3|4|5} of them ;-)))) --DD
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message