Improvement of Print Preview component

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

Improvement of Print Preview component

Postby fgr » December 4th, 2015, 8:56 am

Hi,

I am very delighted of your print preview component that I discovered last week. Great work, it's easy to use and works properly as well.

But since using it, my application compiles with several deprecated warnings and at the end there's a memory leak because of an open filehandle. I slightly patched my local copy like this:

1. The deprecated warnings
In Delphi XE7 the TStream.Seek method you use is deprecated. It can easily be replaced by the overloaded version that takes a parameter of TSeekOrigin enumeration.

2. The memory leak
In Delphi XE7 there's also a memory leak at the end. This occurs because in TTemporaryFileStream.Create a filehandle is created that would never be closed. Adding a overrode destructor that calls CloseHandle(fHandle) resolves that leak.

I really appreciate your work. Thank you very much for this component.
Maybe you'll consider adding those changes to your next version. :-)

Best regards

Florian Grummel
fgr
Member
Member
 
Posts: 1
Joined: December 4th, 2015, 8:43 am

Re: Improvement of Print Preview component

Postby Kambiz » January 3rd, 2016, 7:32 pm

Hi Florian,

Thank you very much for bringing those problems in my attention.

The new version is up and ready.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Re: Improvement of Print Preview component

Postby sh17 » March 16th, 2016, 1:49 pm

sh17
Active Member
Active Member
 
Posts: 8
Joined: September 3rd, 2013, 11:38 am


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 31 guests

cron