On my computer, this piece of code is eating all the memory in under 10 seconds (not a real case, but this is only to demonstrate the problem - we obviously don't create millions of font every seconds).
- Code: Select all
PdfDocument doc = new PdfDocument();
while (true)
{
PdfTrueTypeFont font = new PdfTrueTypeFont(new Font("Comic sans ms", 10));
}
doc.Close();
The question is : Am I doing something wrong? Or if there is actually a memory leak somewhere?
Thanks