Loading... (original) (raw)

FileInputStream relies on finalization to perform final closes if the FIS is not already closed.
This results in extra work for GC that occurs in a burst. The cleanup of FileInputStreams
should happen sooner and not contribute to overhead in GC.
With PhantomReferences a lightweight cleanup mechanism or other suitable mechanism could be implemented.

csr for

CSR - null JDK-8187325 Relax FileInputStream/FileOutputStream requirement to use finalize

relates to

Bug - A problem which impairs or prevents the functions of the product. JDK-8194929 Unreferenced FileDescriptors not closed

Bug - A problem which impairs or prevents the functions of the product. JDK-8187631 Refactor FileDescriptor close implementation

Bug - A problem which impairs or prevents the functions of the product. JDK-8189330 Cleanup FileDescriptor implementation

Enhancement - null JDK-8071507 (ref) Clear phantom reference as soft and weak references do

Bug - A problem which impairs or prevents the functions of the product. CODETOOLS-7902045 Failed to clean up files after test

Enhancement - null JDK-8253568 Replace and mitigate Object.finalize() uses in JDK libraries

Enhancement - null JDK-8348301 Remove unused Reference.waitForReferenceProcessing break-ins in tests

(3 relates to)