The following range of versions of aspose.words have memory leaks in the following function:
MakeObject(u"example.docx");
Aspose.Words.Cpp.23.9.0 → Aspose.Words.Cpp.24.3.0 (now)
The memory leak exists probably even longer.
Can be reproduced as follows:
Snippet
// use a word-file with 1 mb of size to detect the leak quicker.
// Taskmanager shows now a rapid growth in memory
const String systemFilename{ u"example.docx" };
for (int i{}; i < 3700; ++i)
{
System::SmartPtr<Aspose::Words::Document> document = System::MakeObject<Aspose::Words::Document>(systemFilename);
}
@lefev
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): WORDSCPP-1284
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.
@alexey.noskov We have analyzed the problem and detected, that the bug occurs in version 22.10. 22.09 doesn’t contain the memory leak when System::MakeObject<Aspose::Words::Document>() is called on an existing document.
@alexey.noskov I have the same problem and our software keep crashing because of the memory leak.
Our license is expired, what type of support do I need to buy?
Our clients can’t work with our aspose version anymore, thus it is a very urgent issue from our side.
Is there a way to fix this issue quickly?
@VErger Does the problem occur with some particular document on your side? If so, could you please attach it here for testing? We will check the issue and provide you more information.
The problem occurs with every document. In previous versions we didn’t detect any memory leak because aspose was only used on client systems, since clients get restarted frequently. We started using it on a server which slowly builds up the memory usage whenever the System::MakeObject<Aspose::Words::Document> is used. It doesn’t matter which document we use.
It seems not all pointers get deleted.
We created an empty test project as provided by @lefev and detected the same issue. The larger the file the quicker it fills the memory.
This document was used for this test but the memory leak occurs with all docx-Documents. Dokumentation IQ.docx (452.9 KB)
@VErger Thank you for additional information. The issue reported in this thread is not resolved yet. I have informed the development team. We will keep you informed and let you know once the issue is resolved.