We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

PDFImage and PDFDocument memory cleanup

Thread ID:





119873 Aug 8,2015 07:23 PM UTC Aug 11,2015 04:02 AM UTC Xamarin.Forms 3
Tags: PDF
Yves Ducreuzet
Asked On August 8, 2015 07:23 PM UTC


I cannot find any method (Dispose, ...) to properly remove an instance of PDFImage (created from a UIImage). 
I'm generating hundreds of pdfimages for a document and ipad memory is leaking as hell. 
How do i ensure that a PDFImage instance has been disposed from memory ? 

Another question if i want to completly remove an instance of PDFDocument is using the Close(true) method is enough. 
By disposing the PDFDocument instance are childs (pages, pdfimages, ...) disposed as well ? 

Thx for your support !

Praveenkumar H [Syncfusion]
Replied On August 10, 2015 05:04 AM UTC

Hi Yves ,

Thank you for using syncfusion products,

1.       Please use the below code snippet to dispose the “PdfImage” instance properly

//Loading image

PdfImage image = PdfImage.FromStream(imgStream);

//Disposing the image

(image as PdfBitmap).Dispose();

2.       The “Close(true)” method dispose PdfDocument instances and its pages, resources, but we need to dispose “PdfImages” separately as mentioned above.

Please let us know if you need further assistance.

With Regards,

Yves Ducreuzet
Replied On August 10, 2015 11:30 PM UTC

Thx for your support Praveen :) i will test that tomorrow and let you know if this fix my leaks (that are already partially fixed)

Praveenkumar H [Syncfusion]
Replied On August 11, 2015 04:02 AM UTC

Hi Yves,
Thank you for your update,
We will wait to hear from you.
With Regards,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon