Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
Memory Leak in Render |
Post Reply |
Author | |
swb1
Debenu Quick PDF Library Expert Joined: 05 Dec 05 Location: United States Status: Offline Points: 100 |
Post Options
Thanks(0)
Posted: 13 Dec 05 at 5:05PM |
Using AQtime to profile a simple application I have found that I loose 8 bytes on every call that uses the Renderer. While this sounds like a small amount of memory.. trust me - it adds up. My application needs to run unattended for months, and it could process thousands of pages every day making several calls to the Renderer per page. This is my sample code: procedure TForm1.Button2Click(Sender: TObject); var quickPDF : TiSEDQuickPDF; begin quickPDF := TiSEDQuickPDF.Create; quickPDF.UnlockKey( MY_QDPF_KEY ); quickPDF.LoadFromFile( 'AnyDocument.pdf' ); try // This call uses renderer to get text details Memo1.Lines.Text := quickPDF.GetPageText( 3 ); finally quickPDF.Free; end; end; I have found the offending section of code in uPDFRenderer.pas but I don’t know why this code is creating a leak. This function is found at line 1355 of uPDFRenderer.pas procedure DrawXObject(const ResName: string);
Does anybody have any ideas or suggestions? Thanks Edited by swb1 |
|
swb1
Debenu Quick PDF Library Expert Joined: 05 Dec 05 Location: United States Status: Offline Points: 100 |
Post Options
Thanks(0)
|
Found it! Unit:uPDFImageDecoder approx Line:1300 Change From : procedure TPDFImageDecoder.SetColorManager( Change TO: procedure TPDFImageDecoder.SetColorManager( That's 10 hours of my life I'll never get back
Edited by swb1 |
|
SuperDave
Team Player Joined: 10 Nov 05 Location: United Kingdom Status: Offline Points: 19 |
Post Options
Thanks(0)
|
Hi Steve,
I am using the renderer too but don't have the source code. Could you please send me your uPDFImageDecoder.dcu file? Thanks, Dave superdave156@yahoo.co.uk |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Dave!
Michel will collect the corrections from all users and will offer the dcu-files here in a few days as a download-option. Merry Christmas and a Happy New Year for all of you. |
|
Cheers,
Ingo |
|
swb1
Debenu Quick PDF Library Expert Joined: 05 Dec 05 Location: United States Status: Offline Points: 100 |
Post Options
Thanks(0)
|
Dave, If you can wait for Michel you may be better off. The only DCU that I have is D7 and I am not well equiped to compile other versions at this time. If D7 is what you need and you just can't wait, let me know and I will send you the DCU. Steve
|
|
Michel_K17
Newbie www.exp-systems.com Joined: 25 Jan 03 Status: Offline Points: 297 |
Post Options
Thanks(0)
|
Just to be clear: I "only" have Delphi 7, so anything I would compile would only be using that version of Delphi. Would that be a problem for those that use D2005/2006?
|
|
swb1
Debenu Quick PDF Library Expert Joined: 05 Dec 05 Location: United States Status: Offline Points: 100 |
Post Options
Thanks(0)
|
DCUs are version specific. If you are using D7 and you do not have source code you must have DCUs that were compiled with D7 the same will hold true for D2005 & D2006. Supplying multiple versions of the DCUs for the group may prove to be a challenge. While I have several versions of Delphi, I don’t usually have more that one version installed at a time. Even though I bought it, I may never install D2005. I will probably just jump to D2006 when I finally get around to upgrading. Steve
Edited by swb1 |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Michel!
I think that's only a problem to users with delphi versions below 7 ;-) I've d5, d2005 and d2006 installed. ...But 'till now i don't have a source licence ;-) |
|
Cheers,
Ingo |
|
SuperDave
Team Player Joined: 10 Nov 05 Location: United Kingdom Status: Offline Points: 19 |
Post Options
Thanks(0)
|
I still have D5 as it does everything I need and because upgrading Delphi (I started at Borland Pascal for Windows on Windows 3.1 in 1991) has been so difficult in the past.
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Dave,
you can download d2005 for free. The licence is similar to the one from vb express! With the d2005 starter edition you can develope and sell your products as long as you are a single developer (this means a one-man-company). |
|
Cheers,
Ingo |
|
SuperDave
Team Player Joined: 10 Nov 05 Location: United Kingdom Status: Offline Points: 19 |
Post Options
Thanks(0)
|
That is interesting Ingo. I will download it. Thanks.
|
|
Wheeley
Senior Member Joined: 30 Oct 05 Location: United States Status: Offline Points: 146 |
Post Options
Thanks(0)
|
It tried to find this download and failed. Would you happen to have a link?
Thanks Wheeley |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi!
Sorry. "Download" wasn't correct. It was a special borland edition on several magazine cds here in germany in march/april 2005. Perhaps you can go online to your preferred pc magazines and order an older magazine-versions with d2005? |
|
Cheers,
Ingo |
|
Wheeley
Senior Member Joined: 30 Oct 05 Location: United States Status: Offline Points: 146 |
Post Options
Thanks(0)
|
OK. That explains it. I did see on Borland's site where you could get a key for this version. I'm sorry i missed it. Which magazine was it that you got the version with (if you remember)?
Thanks Wheeley |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Wheeley!
German pc magazins: "PC Magazin" "c't" |
|
Cheers,
Ingo |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store