Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.8.0-incubator
-
None
-
None
Description
I'm using PDFBox in a FOP plug-in to embed PDF documents. The PDF images are cached in memory through soft references. Therefore I do not know exactly when the COSDocument needs to be closed. I do close it in the holder's finalize() method but the garbage collector sometimes calls the COSDocument's finalizer before I have a chance to close it myself. With this patch I'd like to introduce an option that lets me disable the warning and do a close() in the finalizer in any case. I do think that the warning can be helpful for newbies (closing early is a good idea when that's possible) but the warning to System.err is a problem in my case.
If noone objects within 72 hours, I'm happy to apply the patch myself.