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

Free Support Forum - aspose.com

Convert TIFF image to PDF in C# | Significant memory leak in Aspose PDF 21.3 and 21.4

We were originally using 18.6 to build pdfs from mixed images (mostly tiffs) and pdfs. We encountered a few issues with that version and pdf corruption, and so upgraded to version 21.3. In 21.3 we have encountered a major memory leak. The services that perform these operations regularly hit 40+GB of ram usage with no signs of the increase stopping.

While trying to figure out the source of this memory issue I put together a small sample application that shows the memory leak. It is a very simple application that just creates a new pdf, adds a single page tiff and a 12 page color pdf to the output pdf, and then saves the file. It then outputs a rolling average of the current working set to the console. I used a rolling average as it aids when trying to show trend lines. The application clearly shows the memory leak occurring.

This is a major issue, and is causing significant issues with our customers. I have attached the application below. It was written in C# for VS 2017. It runs in an infinite loop, creating and saving the pdf. If you see a code issue that might be causing it, please tell me what it is so that I can test the outcome.

MemoryLeak-CreatePDF.zip (1.0 MB)


We were able to notice the memory consumption increase in our environment while testing your application with 21.4 version of the API. Hence, we have logged an issue as PDFNET-49893 in our issue tracking system for further investigation. We will look into its details and let you know once its resolved. Please be patient and spare us some time.

We are sorry for the inconvenience.

Is there an issue tracker available so that we can track the resolution of this issue?


The ticket has been associated with the forum thread and you can see its status at the bottom of this page. There is no other way to track the issue progress. However, we will keep you updated with the ticket status in this forum thread. You may also follow up on the issue in case you need to.

Has there been any movement on this issue? We have had to roll back to our last known good version, 18.7, despite other issues with this version. We are currently evaluating if we will continue with Aspose as our pdf provider, and as much as I really don’t want to rewrite all of our pdf integrations, right now Aspose is proving to be a sub-standard option. In 18.7 there are several pdf corruption issues, and in 21.7 our services crash or have to be restarted every hour due to running out of memory, or even worse crash other services. This is untenable.


Please accept our humble apology for the inconvenience being faced due to this issue. Please also note that we resolve every reported issue however, the issues are resolved on a first come first serve basis in free support model. The investigation against your issue could not get completed due to other issues in the queue logged prior to it. Furthermore, the issues related to performance are complex in nature which causes some delay in their resolution.

Nevertheless, we have recorded your concerns and will surely consider them during issue investigation. We will certainly inform you as soon as we have some news about fix ETA or issue resolution. Your patience and comprehension is highly appreciated in this regard.

We again apologize for the inconvenience.

We have upgraded to paid support. What is required to escalate this issue?


You can please login to helpdesk using the same email address used to purchase subscription and create a ticket there with the reference to issue ID PDFNET-49893. Your issue will be escalated to the highest priority.