> Date: Tue, 24 Mar 2009 21:22:03 -0500
> From: name and address withheld from trolls and spammers
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] OutOfMemoryError when PdfTemplate is used
>
> Hi Mike,
>
> Thanks a lot for your valuable reply. Its working with
> PdfWriter.releaseTemplate().

Thanks for responding as I wasn't sure you would read down
to the bottom and I slipped by putting the editorial above
the information :)

I think I had also seen the answer posted prior to making
my reply so it was a bit of a biased approach but
I think the strategy is generally good. Of course, "close"
would also be something to look for.  I've never
used them but there are heap dump tools that 
should be able to give you some suspects. In fact,
I just tried jhat on a contrived case and
you may want to post output from this in the future
( "why do I have 100,000 pdfwriters? LOL): 


http://java.sun.com/javase/6/docs/technotes/tools/share/jhat.html


http://www.google.com/search?hl=en&q=java+heap+dump+site%3Asun.com&btnG=Google+Search&aq=f&oq=

  467  java -XX:+HeapDumpOnOutOfMemoryError x
  470  jhat java_pid3628.hprof 
  472  history  | tail | unix2dos> /dev/clipboard

I opened a browser to 127.0.0.1:7000 and got a heap dump
showing the biggest memory offenders ( or course lynx would have
worked as well as firefox). 

I've been developing on wireless and forget these things are available
and this worked on the first try :)


>
>
> Pradeep
> In this case, I just grepped the source code for "memory" and
> does look like there are reasonably good comments about this issue
> in many places. "Release" is often used and the code is pretty well
> written so you can go through and find methods that may use this name,
>
>
> 518 for f in `cat xxx`; do grep " public .*(" "$f" ; done> fff
>
> make a vocabulary list ( again, names are easy to parse mostly ),
> 522 cat fff | sed -e 's/(.*//' | sed -e 's/public//' | sed -e
> 's/\([a-z]\)\([A-Z]\)/\1 \2/g' | freqassoc> ggg
>
> or, if you look for "release",
>
> 526 cat fff | sed -e 's/(.*//' | sed -e 's/public//' | grep -i
> release
>
>
> static PdfObject getPdfObjectRelease
> static PdfObject getPdfObjectRelease
> PdfObject getPdfObjectRelease
> void releaseLastXrefPartial
> static void releaseLastXrefPartial
> PdfDictionary getPageNRelease
> void releasePage
> void resetReleasePage
> PdfDictionary getPageNRelease
> PRIndirectReference getPageOrigRefRelease
> void releasePage
> void resetReleasePage
> void releaseTemplate
>
>


_________________________________________________________________
Get quick access to your favorite MSN content with Internet Explorer 8. 
http://ie8.msn.com/microsoft/internet-explorer-8/en-us/ie8.aspx?ocid=B037MSN55C0701A
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to