Hi Aspose,
I am currently in a situation were the following code generates a memoy leak for certain documents only
try{
Aspose.Pdf.Document document = new Aspose.Pdf.Document(stream);
foreach (Page page in document.Pages)
{
// Get the fonts being used on the page
foreach (Aspose.Pdf.Text.Font font in page.Resources.Fonts)
{
font.IsEmbedded = true;
}
}
}finally
{
if (document != null)
{
document.FreeMemory();
document.Dispose();
document = null;
}
}
The memory leak occurs when trying to access individual pages in document in the for loop.
In order words doing something like:
Page newPage = document.Pages[1];
is going to cause my program to hang with intensive CPU usage.
Would you know what could be cause to this issue?
Thanks!