<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Possible memory leak while getting table definition in File Geodatabase API Questions</title>
    <link>https://community.esri.com/t5/file-geodatabase-api-questions/possible-memory-leak-while-getting-table/m-p/594964#M963</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: lshipman&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have a fix for this that will be included in the next release (1.4). We expect to release 1.4 within the next two months.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jan 2014 21:55:51 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2014-01-15T21:55:51Z</dc:date>
    <item>
      <title>Possible memory leak while getting table definition</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/possible-memory-leak-while-getting-table/m-p/594963#M962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: sbeaumont&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the FileGDB API 1.3 (C++) through GDAL and my process always finishes by crashing with a OutOfMemory error after opening and closing a GDB file (5-6 times) that contains about 350 feature datasets.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To find where is the problem, I finally wrote a simple C++ program which opens a file geodatabase, loops over the tables and gets the definiton for all of them. All tables and the geodatabase are closed properly, and all pointer are deleted. However, the memory grows for every call to the:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;pTable-&amp;gt;GetDefinition(tableDef)&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;function. I also try with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;pGeoDatabase-&amp;gt;GetDatasetDefinition(tables&lt;I&gt;, type, tableDef)&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;and I get the same result.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Either there is a memory leak in the FileGDB API or I really missed something.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the function called for every tables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table* pTable = new Table();

&amp;nbsp;&amp;nbsp;&amp;nbsp; if (FAILED(hr = pGeoDatabase-&amp;gt;OpenTable(tables&lt;I&gt;, *pTable)))
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete pTable;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wcout&amp;nbsp; &amp;lt;&amp;lt; L"Error opening " &amp;lt;&amp;lt; tables&lt;I&gt; &amp;lt;&amp;lt; ". Skipping it" &amp;lt;&amp;lt; endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; continue;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }

&amp;nbsp;&amp;nbsp;&amp;nbsp; string tableDef;

&amp;nbsp;&amp;nbsp;&amp;nbsp; if (FAILED(hr = pTable-&amp;gt;GetDefinition(tableDef)))
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pGeoDatabase-&amp;gt;CloseTable(*pTable);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete pTable;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wcout&amp;nbsp; &amp;lt;&amp;lt; L"Failed at getting table definition for " &amp;lt;&amp;lt; tables&lt;I&gt; &amp;lt;&amp;lt; endl;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; continue;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }

&amp;nbsp;&amp;nbsp;&amp;nbsp; pGeoDatabase-&amp;gt;CloseTable(*pTable);

&amp;nbsp;&amp;nbsp;&amp;nbsp; delete pTable;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Am I the only one who gets this ? Please post any idea to solve my problem...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sylvain&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:33:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/possible-memory-leak-while-getting-table/m-p/594963#M962</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-12T01:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: Possible memory leak while getting table definition</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/possible-memory-leak-while-getting-table/m-p/594964#M963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: lshipman&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have a fix for this that will be included in the next release (1.4). We expect to release 1.4 within the next two months.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jan 2014 21:55:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/possible-memory-leak-while-getting-table/m-p/594964#M963</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-01-15T21:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Possible memory leak while getting table definition</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/possible-memory-leak-while-getting-table/m-p/594965#M964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: sbeaumont&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good news, thank you ! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it possible to get a BETA version for the 1.4 version ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sylvain&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2014 17:17:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/possible-memory-leak-while-getting-table/m-p/594965#M964</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-01-16T17:17:54Z</dc:date>
    </item>
  </channel>
</rss>

