You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (Jira)" <ji...@apache.org> on 2022/10/26 20:22:00 UTC

[jira] [Created] (PDFBOX-5534) Remove finalize from ScratchFileBuffer

Andreas Lehmkühler created PDFBOX-5534:
------------------------------------------

             Summary: Remove finalize from ScratchFileBuffer
                 Key: PDFBOX-5534
                 URL: https://issues.apache.org/jira/browse/PDFBOX-5534
             Project: PDFBox
          Issue Type: Improvement
          Components: Parsing
    Affects Versions: 2.0.27, 3.0.0 PDFBox
            Reporter: Andreas Lehmkühler
            Assignee: Andreas Lehmkühler


The usage of finalize is discouraged so that it is a good idea to remove it.

I've found a way to do so for ScratchFileBuffer. All created buffers are collected within ScratchFile. Once a buffer is closed it is removed from the collection. If ScratchFile is closed when closing the pdf all remaining buffers are closed as well.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org