]> source.dussan.org Git - poi.git/commitdiff
XWPF: dispose xml cursor when iteration over it is done
authorMaxim Valyanskiy <maxcom@apache.org>
Tue, 16 Nov 2010 12:45:39 +0000 (12:45 +0000)
committerMaxim Valyanskiy <maxcom@apache.org>
Tue, 16 Nov 2010 12:45:39 +0000 (12:45 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1035615 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java

index d4c22045918b35609502144b6508ff10432f8f5e..3d1ee2a58a0171e31a7420e0d2854c6ea86de4ed 100644 (file)
@@ -155,6 +155,7 @@ public class XWPFDocument extends POIXMLDocument implements Document, IBody {
                        tables.add(t);
                 }
             }
+            cursor.dispose();
                        
             // Sort out headers and footers
                        if (doc.getDocument().getBody().getSectPr() != null)
index 7b33d48c0480ee473afa2c976d991f402e274322..2e7e16f3eda4d47416ca335ac6bb4072dd0a53ec 100644 (file)
@@ -140,6 +140,7 @@ public class XWPFParagraph implements IBodyElement{
                    footnoteText.append("]");
                 }
              }
+             c.dispose();
           }
       }
     }