Hi team,
I have created a server application that process the input pdf documents to html formats using Aspose.PDF.Cpp.
But, as more documents are processed, the application’s memory consumption continually increases. After processing approximately 10,000 PDF documents, the memory reaches up to 6GB.
I have to restart the server every time to free the memory.
After some testing, it appears that the memory leak originates from the Aspose library.
To confirm this, I used a simplified code to convert a single PDF to HTML and ran it through Valgrind to trace memory usage. The results indicate memory not being properly freed within the Aspose components.
I’m currently using Aspose.PDF.Cpp.25.1.Linux. I have tried updating to latest version, but the issue still exists.
Please refer to the atachments:
(sample code used for testing, input pdf and valgrind report)
aspose-memory.7z (127.1 KB)
Could you please help verify this issue, and advise any workarounds when using Aspose.PDF for C++ in long-running applications?
@vibhesh.patneedi
We are checking it and will get back to you shortly.
@vibhesh.patneedi
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): PDFCPP-3295
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Hi Team,
Thank you for your response.
We’ve been regular users of your products and currently use Aspose.PDF and Aspose.Words for Java under a paid license. Due to high memory usage in our Java application, we began evaluating the C++ versions of these libraries as potential replacements.
However, during our testing, we encountered this memory leak.
We would greatly appreciate a quick resolution to this issue as it directly impacts our work and could potentially affect our client commitments.
Once the high memory usage is addressed, we will purchase the latest versions of Aspose.PDF and Aspose.Words for C++.
Thanks for your support.
Hi Team,
I’m following up on the issue regarding the memory leak in Aspose.PDF for C++ (Ticket ID: PDFCPP-3295). This issue continues to impact our workflow, and we would appreciate it if you could share an estimated time for the resolution.
Thanks
Hi @vibhesh.patneedi
We truly value you as a future customer and will do our best to resolve that issue immediately.
Unfortunately, I can not say the exact term, but it could be the nearest releases.
Thank you again for your interest!
Hi @vibhesh.patneedi,
My name is Ruslan, and I am currently responsible for identifying and resolving memory leaks within the Aspose.PDF.C++ product, as well as related sub-components.
Aspose.PDF.C++ is a sophisticated library that integrates over 24 Aspose sub-libraries. To support our debugging efforts, we utilize both standard diagnostic tools and a suite of specialized tools developed internally. These internal tools significantly accelerate the process of pinpointing problematic areas and determining the root causes of memory leaks.
I am actively working on the ticket and have already identified several memory leaks within some of the sub-libraries. I am in the process of addressing these issues.
Thank you for providing the code example - if I understand correctly, it represents a general use case of the Aspose.PDF.C++ library in your product. If you can share more details, it might be helpful.