Memory release in aspose.pdf

Hi,


Are there any guidelines for releasing memory in Aspose objects?

We currently create a pdf and add an image (stream) to each section in the pdf.

1. Are there any “dispose” functions that can be used for these objects?
2. If originally we use a Document object, once we convert it to pdf how can we release it?
3. At what stage can the original streams of the images be disposed of without causing an exception?

Thanks

Hi,

Thanks for your interest in our products.

The recommended approach is to close the MemoryStream objects (holding contents of PDF file) once the PDF document is saved. If you close the MemoryStream objects before saving the PDF file, the resultant PDF might end up with missing contents or blank pages. In the event of any further query, please feel free to contact.