<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>Debenu Quick PDF Library - PDF SDK Community Forum : RenderPageToString: How to free result memory</title>
  <link>http://www.quickpdf.org/forum/</link>
  <description><![CDATA[This is an XML content feed of; Debenu Quick PDF Library - PDF SDK Community Forum : I need help - I can help : RenderPageToString: How to free result memory]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 01 May 2026 05:16:48 +0000</pubDate>
  <lastBuildDate>Wed, 21 Aug 2013 15:40:01 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 11.01</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.quickpdf.org/forum/RSS_post_feed.asp?TID=2702</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Debenu Quick PDF Library - PDF SDK Community Forum]]></title>
   <url>http://www.quickpdf.org/forum/forum_images/QPDF_Forum_Title.png</url>
   <link>http://www.quickpdf.org/forum/</link>
  </image>
  <item>
   <title><![CDATA[RenderPageToString: How to free result memory :   tfrost wrote:Allocating and...]]></title>
   <link>http://www.quickpdf.org/forum/renderpagetostring-how-to-free-result-memory_topic2702_post11129.html#11129</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=2439">kmsb12</a><br /><strong>Subject:</strong> 2702<br /><strong>Posted:</strong> 21 Aug 13 at 3:40PM<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by tfrost" alt="Originally posted by tfrost" style="vertical-align: text-bottom;" /> <strong>tfrost wrote:</strong><br /><br />Allocating and freeing memory on opposite sides of a DLL boundary is normally a recipe for subtle problems</td></tr></table><div><br></div><div>To clearify, I do not delete the memory block holding the pixel data directly. I tried that too, but it did not work&nbsp;<img src="http://www.quickpdf.org/forum/smileys/smiley2.gif" border="0" alt="Wink" title="Wink" /></div><div>Instead I delete the whole library object.</div><div><br></div><div><font face="Courier New, Courier, mono">DebenuPDFLibraryDLL0914 *pdfLib = new&nbsp;</font><span style="font-family: 'Courier New', Courier, mono; line-height: 1.4;">DebenuPDFLibraryDLL0914(...);</span></div><div><span style="font-family: 'Courier New', Courier, mono; line-height: 1.4;">...</span></div><div><span style="font-family: 'Courier New', Courier, mono; line-height: 1.4;">// do whatever with pdfLib</span></div><div><span style="font-family: 'Courier New', Courier, mono; line-height: 1.4;">...</span></div><div><span style="font-family: 'Courier New', Courier, mono; line-height: 1.4;">delete pdfLib;</span></div><div><span style="font-family: 'Courier New', Courier, mono; line-height: 1.4;"><br></span></div><div><span style="line-height: 1.4;"><font face="Arial, Helvetica, sans-serif" size="2">By doing this, I have to recreate the library object again every time after destroying it. But that's OK. As I use the DA... (direct access) methods, I do not need to reload the whole PDF file as I instantiate the pdf library.</font></span></div>]]>
   </description>
   <pubDate>Wed, 21 Aug 2013 15:40:01 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/renderpagetostring-how-to-free-result-memory_topic2702_post11129.html#11129</guid>
  </item> 
  <item>
   <title><![CDATA[RenderPageToString: How to free result memory : Are you absolutely certain that...]]></title>
   <link>http://www.quickpdf.org/forum/renderpagetostring-how-to-free-result-memory_topic2702_post11127.html#11127</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1388">tfrost</a><br /><strong>Subject:</strong> 2702<br /><strong>Posted:</strong> 21 Aug 13 at 10:51AM<br /><br />Are you absolutely certain that your main program and the DLL use a common allocator and common memory pools, and always will in future? &nbsp;Allocating and freeing memory on opposite sides of a DLL boundary is normally a recipe for subtle problems which hit you long after the event, when the pool is next used.]]>
   </description>
   <pubDate>Wed, 21 Aug 2013 10:51:19 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/renderpagetostring-how-to-free-result-memory_topic2702_post11127.html#11127</guid>
  </item> 
  <item>
   <title><![CDATA[RenderPageToString: How to free result memory : Thanks for your answers!QP.LibraryVersion...]]></title>
   <link>http://www.quickpdf.org/forum/renderpagetostring-how-to-free-result-memory_topic2702_post11122.html#11122</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=2439">kmsb12</a><br /><strong>Subject:</strong> 2702<br /><strong>Posted:</strong> 20 Aug 13 at 4:25PM<br /><br />Thanks for your answers!<div><span style=": rgb251, 251, 253;">QP.LibraryVersion did not work for me.</span></div><div><span style=": rgb251, 251, 253;">I now&nbsp;</span><span style=": rgb251, 251, 253; line-height: 1.4;">free the library with delete (I am using the C++ wrapper of the library)</span></div><div><span style=": rgb251, 251, 253; line-height: 1.4;"><br></span></div><div><span style=": rgb251, 251, 253; line-height: 1.4;"><br></span></div>]]>
   </description>
   <pubDate>Tue, 20 Aug 2013 16:25:55 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/renderpagetostring-how-to-free-result-memory_topic2702_post11122.html#11122</guid>
  </item> 
  <item>
   <title><![CDATA[RenderPageToString: How to free result memory : Kristoff,DQPL maintains a buffer...]]></title>
   <link>http://www.quickpdf.org/forum/renderpagetostring-how-to-free-result-memory_topic2702_post11069.html#11069</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1483">AndrewC</a><br /><strong>Subject:</strong> 2702<br /><strong>Posted:</strong> 06 Aug 13 at 4:33AM<br /><br /><div>Kristoff,</div><div><br></div>DQPL maintains a buffer to return data from the DLL. &nbsp;As you have correctly determined the memory is not freed again until the next call to the DLL. &nbsp;You could call something like QP.LibraryVersion which will return a much much smaller buffer effectively freeing the larger buffer from the previous DLL call.<div><br></div><div>Andrew.</div>]]>
   </description>
   <pubDate>Tue, 06 Aug 2013 04:33:35 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/renderpagetostring-how-to-free-result-memory_topic2702_post11069.html#11069</guid>
  </item> 
  <item>
   <title><![CDATA[RenderPageToString: How to free result memory : Hi Kristoff!I think you&amp;#039;ll...]]></title>
   <link>http://www.quickpdf.org/forum/renderpagetostring-how-to-free-result-memory_topic2702_post11065.html#11065</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 2702<br /><strong>Posted:</strong> 05 Aug 13 at 6:33PM<br /><br />Hi Kristoff!<div><br></div><div>I think you'll need the FREE ;-)</div><div>Another hint: Don't mix (never!) DA... and non-DA-functions!</div><div>Inside a try...create...finally...free...end you should use DA... or non-DA but never both!</div><div>This you can read in the online-references, too ;-)</div><div><br></div><div>Cheers and welcome here,</div><div>Ingo</div><div><br></div>]]>
   </description>
   <pubDate>Mon, 05 Aug 2013 18:33:36 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/renderpagetostring-how-to-free-result-memory_topic2702_post11065.html#11065</guid>
  </item> 
  <item>
   <title><![CDATA[RenderPageToString: How to free result memory : I am using the RenderPageToString...]]></title>
   <link>http://www.quickpdf.org/forum/renderpagetostring-how-to-free-result-memory_topic2702_post11064.html#11064</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=2439">kmsb12</a><br /><strong>Subject:</strong> 2702<br /><strong>Posted:</strong> 05 Aug 13 at 2:16PM<br /><br />I am using the RenderPageToString and the DARenderPageToString&nbsp;functions of the Quickpdf library.<div>Those functions return me a pointer to char (char*) to the rendering results. The memory holding the result data will not be freed until I call&nbsp;<span style="line-height: 1.4;">RenderPageToString again.&nbsp;</span><span style="line-height: 1.4;">The memory will not be cleaned up when I call DACloseFile either.</span></div><div><span style="line-height: 1.4;">I found out that I can call DA</span><span style="line-height: 1.4;">RenderPageToString</span><span style="line-height: 1.4;">&nbsp;with an invalid pageRef (0 for instance). The memory from the last&nbsp;</span><span style="line-height: 1.4;">rendered&nbsp;</span><span style="line-height: 1.4;">page is cleaned up and no new memory will be reserved for the next page rendering.</span></div><div><span style="line-height: 1.4;"><br></span></div><div><span style="line-height: 1.4;">My question now: Is there any official function for cleaning up memory and invalidating the render results or do I have to live with my workaround?</span></div><div><span style="line-height: 1.4;"><br></span></div><div><span style="line-height: 1.4;">Thanks a lot.</span></div><div><span style="line-height: 1.4;">Kristoff</span></div><div><span style="line-height: 1.4;"><br></span></div><div><span style="line-height: 1.4;"><br></span></div>]]>
   </description>
   <pubDate>Mon, 05 Aug 2013 14:16:07 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/renderpagetostring-how-to-free-result-memory_topic2702_post11064.html#11064</guid>
  </item> 
 </channel>
</rss>