We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Memory leak when convert pdf pages to jpeg

version: aspose.pdf-4.1.0.jar in Aspose.Pdf for Java 4.1.0 (6/29/2013 10:42:21 PM)

we found there're some memory leak when convert enclosed sample.pdf pages to jpeg

com.aspose.pdf.Document doc = new com.aspose.pdf.Document("/tmp/sample.pdf");
com.aspose.pdf.PageCollection pages = doc.getPages();
for( int i=1;i<=pages.size();++i ){
com.aspose.pdf.Page page = pages.get_Item(i);
com.aspose.pdf.Resolution resolution = new com.aspose.pdf.Resolution(120);
com.aspose.pdf.JpegDevice jpegDevice = new com.aspose.pdf.JpegDevice(resolution, 100 );
String pageOutputPath = String.format("/tmp/%d.jpg", i-1);
jpegDevice.process(page, pageOutputPath);
page = null;
resolution = null;
jpegDevice = null;

It leaks 1MB around every 18 pages.
Please help!

Hi Nono,

Thanks for contacting support.

I have tested the scenario using Aspose.Pdf for Java 4.1.2 over Windows 7(X64) and I am un able to notice the memory leak issue. Can you please share some details which can help us in noticing this problem. We apologize for this inconvenience.

Hi Nayyer,

Thanks for supporting. We’ll try Aspose.Pdf for Java 4.1.2 first.