Memory after pdf creation

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v6)  /  Memory after pdf creation

DynamicPDF CoreSuite for .NET (v6) Forum

 Mar 28 2013 2:51 AM
Hello,

We are using ceTe.DynamicPDF.35(version 6.0.4.35) to create a pdf file. We create a pdfDocument object, add pages and elements and call Draw() method by specifying a file name.
After this, we set the pdfDocument object to null.

Basically we want to release the memory held by pdfDocument object once the file is created.

Now the question is:
1. After the file is created, will the memory be still held or is it released by any means?
2. We did not find any clear/flush/dispose method with the pdfDocument object. Do you provide any method to release the memory of pdfDocument object once document is created?

Regards,
Swaroop Shikhare
 Mar 28 2013 10:22 AM
Posted by a ceTe Software moderator
Hello Swaroop,

The only way to dispose of this memory is to dispose the PdfDocument object itself, if you know that you are not going to be using it anymore. The reason there is no Dispose method implemented on the PdfDocument is because the object is a 100% managed object and there are no unmanaged resources to dispose. The .NET Garbage Collector will take care of disposing the PdfDocument object automatically (if it is not being used) as it is a managed resource. If you really want to dispose the PdfDocument object (instead of relying on Garbage Collector) set it to null and call the GC.Collect() method. But using the GC.Collect() is not usually recommended and should be used with caution. For more info on this topic please refer to the Microsoft Developer Blog link on this topic.

Thanks,
ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 11:34 AM.