[ https://issues.apache.org/jira/browse/PDFBOX-5943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17922595#comment-17922595 ]
ASF subversion and git services commented on PDFBOX-5943: --------------------------------------------------------- Commit 1923475 from le...@apache.org in branch 'pdfbox/trunk' [ https://svn.apache.org/r1923475 ] PDFBOX-5943: remove page resources after processing the page > Extend interface ResourceCache to support the removal of cached objects > ----------------------------------------------------------------------- > > Key: PDFBOX-5943 > URL: https://issues.apache.org/jira/browse/PDFBOX-5943 > Project: PDFBox > Issue Type: Improvement > Components: Parsing > Affects Versions: 3.0.4 PDFBox, 4.0.0 > Reporter: Andreas Lehmkühler > Assignee: Andreas Lehmkühler > Priority: Major > Fix For: 4.0.0 > > > The interface {{org.apache.pdfbox.pdmodel.ResourceCache}} defines an api to > be used to cache the resources of a pdf while processing it. While is > consists of methods to add and get objects to/from the cache there aren't any > to remove them from the cache. > The resource cache is bound to the PDDocument so that the resources of a pdf > are collected during processing until the pdf is closed. > PDFBox has no chance to release those resources which are no longer needed. > The class which implemented the interface has no chance to know when a > resources is no longer needed and it is save to remove it from the cache. > The current default implementation uses SoftReferences and relies on the > garbage collector when it comes to release resources from the cache. This > works as long as enough memory is available and/or the object generating code > isn't faster than the garbage collector. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org