Hi,

Am 02.12.2015 um 01:16 schrieb Adam Retter:
Hey guys,

Using either 2.0.0-RC1 or 2.0.0-RC2 I am seeing a lot of debug
messages which look like:

"ScratchFileBuffer not closed!"

When I trace this it appears that this is called by `finalize` being
called on the ScratchFileBuffer.

I am opening and closing my PDDocument by using try-with-resources, i.e.

try(final PDDocument doc = PDDocument.load(pdf.asFile)) {
...
}

As far as I can see I am not manually specifying any Scratch files,
are there any known issues with these not being correctly freed in
2.0.0?
It looks like the finalize is faster than the auto-close.
So, the question is, do you dereference the doc instance right at the end of your try-with-resources block or is something memory consuming/else done before reaching the end so that there is enough time for the garbage collection to be ran before (automatically) calling doc.close?

Cheers Adam.

BR
Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to