pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1600701 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java
Date Thu, 05 Jun 2014 17:08:21 GMT
Author: lehmi
Date: Thu Jun  5 17:08:21 2014
New Revision: 1600701

URL: http://svn.apache.org/r1600701
Log:
PDFBOX-2101: added a clear method to be called to release all cached resources

Modified:
    pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java

Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java?rev=1600701&r1=1600700&r2=1600701&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java (original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java Thu Jun
 5 17:08:21 2014
@@ -907,4 +907,19 @@ public class PDPage implements COSObject
     {
         return this.getCOSDictionary().hashCode();
     }
+    
+    /**
+     * Calling this will release all cached information.
+     * 
+     */
+    public void clear()
+    {
+        if (pageResources != null)
+        {
+            pageResources.clear();
+        }
+        mediaBox = null;
+        parent = null;
+    }
+
 }



Mime
View raw message