[ https://issues.apache.org/jira/browse/FOP-2845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17569885#comment-17569885 ]
Simon Steiner commented on FOP-2845: ------------------------------------ What about setting: -Dorg.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.no-source-reuse=true > File leak to background-image > ----------------------------- > > Key: FOP-2845 > URL: https://issues.apache.org/jira/browse/FOP-2845 > Project: FOP > Issue Type: Bug > Affects Versions: 2.3 > Reporter: Björn Kautler > Assignee: Matthias Reischenbacher > Priority: Major > > I use FOP from within my Gradle build to produce documentation PDFs. > So the VM usually is not closed, but the Gradle Daemon that executes the > build stays alive. > I built some PDF and then tried to delete the folder as it was just a test, > but one file was still locked by the Gradle process, so FOP seems to leak > that file resource. > It was the {{draft.png}} that is set as {{background-image}} in this snippet. > Also interesting, this page master was not even used, so it is even more > suspicious why the file was opened for reading at all, but that it stays > locked is pretty unnice. > {code:xml} > <fo:simple-page-master margin-right="0cm" margin-left="0cm" > margin-bottom="0cm" margin-top="0cm" page-height="297mm" page-width="210mm" > master-name="my-titlepage-first-draft"> > <fo:region-body column-count="1" > column-gap="12pt" > margin-top="0cm" > margin-bottom="0cm" > > background-image="url(../../common/images/decorative/draft.png)" > background-attachment="fixed" > background-repeat="no-repeat" > background-position-horizontal="center" > background-position-vertical="center"/> > <fo:region-before display-align="before" extent="0cm" > region-name="xsl-region-before-first"/> > <fo:region-after display-align="after" extent="0cm" > region-name="xsl-region-after-first"/> > </fo:simple-page-master> > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)