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.

GC.SuppressFinalize in PdfTrueTypeFont Dispose method

Thread ID:

Created:

Updated:

Platform:

Replies:

98996 Apr 15,2011 04:29 AM May 6,2011 08:13 AM Windows Forms 3
loading
Tags: PDF
Enrica EANDI
Asked On April 15, 2011 04:29 AM

Hi,

premise: i bought Syncfusion source code.

I've a problem with finalizing PdfTrueTypeFont objects because in the destructor method ( ~PdfTrueTypeFont() ) is called the Clear() of the static cache (PdfDocument.Cache.Clear();). Why?

The destructor of objects is called from the Garbage Collector and we don't know when it is called. Microsoft "Dispose pattern" specifies that the Dispose method must contains the GC.SuppressFinalize, so if it is called manually the object destructor it's not called later by the Garbage Collector.

The problem using the PdfTrueTypeFont is that i call manually the Dispose method (i need to call it working with isposable and generic objects) on it and later the GC call the destructor...but whe the GC call the destructor i'm creating another PDFDocument with other new Fonts and the destructor (of previous pdffont) clear the cache.

Why at the end of Dispose method of PdfTrueTypeFont is not present the GC.SuppressFinalize?


Regards,
Stefano




Geetha M [Syncfusion]
Replied On April 21, 2011 07:55 AM

Hi Stefano,

Thank you for your interest in Syncfusion products.

I have forwarded this query to our development team and will get back to you in two days.

Please let me know if you have any questions.

Regards,
Geetha


Enrica EANDI
Replied On May 6, 2011 07:46 AM

Hi,

news about this post?


Regards,
Stefano Montimoregi


Geetha M [Syncfusion]
Replied On May 6, 2011 08:13 AM

Hi Stefano,

Sorry for the delayed response.

We have modified the dispose pattern of PdfTrueTypeFont with v9.1. Could you please try with this version? If you are still able to reproduce the problem, please create a new direct trac incident with details.

Regards,
Geetha


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.

;