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.
Unfortunately, activation email could not send to your email. Please try again.

PDFImage and PDFDocument memory cleanup

Thread ID:

Created:

Updated:

Platform:

Replies:

119873 Aug 8,2015 03:23 PM Aug 11,2015 12:02 AM Xamarin.Forms 3
loading
Tags: PDF
Yves Ducreuzet
Asked On August 8, 2015 03:23 PM

Hi,

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 01:04 AM

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,
Praveen

Yves Ducreuzet
Replied On August 10, 2015 07:30 PM

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 12:02 AM

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

CONFIRMATION

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.

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.

;