keiron      01/08/22 23:14:33

  Modified:    src/org/apache/fop/render/pdf PDFRenderer.java
  Log:
  made the pdf renderer reusable (eg. how cocoon uses it)
  prevents it creating invalid documents
  frees up memory
  
  Revision  Changes    Path
  1.86      +10 -1     xml-fop/src/org/apache/fop/render/pdf/PDFRenderer.java
  
  Index: PDFRenderer.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/pdf/PDFRenderer.java,v
  retrieving revision 1.85
  retrieving revision 1.86
  diff -u -r1.85 -r1.86
  --- PDFRenderer.java  2001/08/21 08:26:11     1.85
  +++ PDFRenderer.java  2001/08/23 06:14:33     1.86
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PDFRenderer.java,v 1.85 2001/08/21 08:26:11 keiron Exp $
  + * $Id: PDFRenderer.java,v 1.86 2001/08/23 06:14:33 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -157,6 +157,15 @@
           renderRootExtensions(extensions);
           FontSetup.addToResources(this.pdfDoc, fontInfo);
           pdfDoc.outputTrailer(stream);
  +
  +        // this frees up memory and makes the renderer reusable
  +        this.pdfDoc = new PDFDocument();
  +        this.pdfResources = null;
  +        extensions = null;
  +        currentStream = null;
  +        currentAnnotList = null;
  +        currentPage = null;
  +        currentColor = null;
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to