pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1517303 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/RenderUtil.java
Date Sun, 25 Aug 2013 14:39:31 GMT
Author: lehmi
Date: Sun Aug 25 14:39:31 2013
New Revision: 1517303

URL: http://svn.apache.org/r1517303
Log:
PDFBOX-1687: call graphics.dispose() to release resources as proposed by Tilman Hausherr

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/RenderUtil.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/RenderUtil.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/RenderUtil.java?rev=1517303&r1=1517302&r2=1517303&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/RenderUtil.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/RenderUtil.java Sun Aug 25 14:39:31
2013
@@ -173,7 +173,9 @@ public class RenderUtil
         {
             retval = new BufferedImage(widthPx, heightPx, imageType);
         }
-        renderPage(page, (Graphics2D) retval.getGraphics(), retval.getWidth(), retval.getHeight(),
scale, scale);
+        Graphics2D graphics2D = (Graphics2D) retval.getGraphics();
+        renderPage(page, graphics2D, retval.getWidth(), retval.getHeight(), scale, scale);
+        graphics2D.dispose();
         return retval;
     }
 



Mime
View raw message