Our application memory spikes and never recovers when creating and saving aspose documents. We created a test case that does nothing but open a stream of bytes and write them with an Aspose Document to a file. The first picture is after the document has fallen out of scope and out of the stream using statement, and should be deallocated. The second picture is after an explicit GC.Collect(). There is no change in allocation, there are no references in our code to any of the objects, yet there are thousands of Paragraph, image, etc objects in memory that NEVER get deallocated. Here is the sample code that still produces a memory issue.
using (MemoryStream stream = new MemoryStream(bytes))
{
Aspose.Words.Document doc = new Aspose.Words.Document(stream);
doc.Save("C:/users/me/test.pdf", SaveFormat.Pdf);
}
GC.Collect();
after.png (37.8 KB)
before.png (37.5 KB)