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!
![]() |
How to free memory after ExtractPageText? |
Post Reply ![]() |
Author | |
Simon Kemp ![]() Beginner ![]() Joined: 17 Sep 12 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() Posted: 17 Sep 12 at 8:55AM |
Hello,
I'm using ExtractPageText from a clarion program - all works very well but I don't know how to release the memory taken-up by the returned string. Any clues on this? Wondering if I need to make an api call of some kind involving address of the string. Thanks, Simon |
|
![]() |
|
AndrewC ![]() Moderator Group ![]() ![]() Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
![]() ![]() ![]() ![]() ![]() |
Calling QP.LibraryVersion() should free that large buffer and return a much smaller buffer of 4 bytes.
The DLL always keeps the last string result from the DLL active and the easiest way to free it is to call the DLL again with a function such as LibraryVersion. This method allows us much more flexibility when working with string buffers. Andrew.
|
|
![]() |
|
Simon Kemp ![]() Beginner ![]() Joined: 17 Sep 12 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
That is making loads of sense. I'll try soonish and report back.
Should explain that from clarion I can't actually take a "cstring" (null terminated string) as a return value. The workround is to prototype that QuickPDF is returning a long, then reference that address as a cstring. It left me thinking that housekeeping had to happen from my side - dumb of me. And now realise I have to be careful to finish working with my 'pretend cstring' before asking QuickPDF to do anything else. Thank-you. |
|
![]() |
|
Simon Kemp ![]() Beginner ![]() Joined: 17 Sep 12 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
Confirmed that quickpdf is tidying-up correctly. My memory leak must be somewhere else...
Thanks for the help, Simon |
|
![]() |
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