code review request : 7105952: Improve finalisation for FileInputStream/FileOutputStream/RandomAccessFile

Charles Lee littlee at linux.vnet.ibm.com
Wed Nov 2 01:13:55 UTC 2011


On 11/01/2011 11:09 PM, Seán Coffey wrote:
> The fd count was only used if it was the finalizer thread. Any 
> explicit close() call not from finalizer meant that the FD got closed.
>
>         /*
>          * If FileDescriptor is still in use by another stream, the 
> finalizer
>          * will not close it.
>          */
>         if ((useCount <= 0) || !isRunningFinalize()) {
>             close0();
>         }
>
> regards,
> Sean.
>
> On 01/11/2011 14:57, Charles Lee wrote:
>>>
>> Does it change the original mechanism? IIRC, the original will remain 
>> the other FileInputStream function well (can read from the under 
>> stream), until the fd count become 0. 
>
Hi Sean,

I finally got the background mail from Alan. No questions from me now.

-- 
Yours Charles




More information about the core-libs-dev mailing list