Select to view content in your preferred language

Possible memory leak while getting table definition

3667
2
01-14-2014 08:51 AM
by Anonymous User
Not applicable
Original User: sbeaumont

Hi,

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.

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:
pTable->GetDefinition(tableDef)

function. I also try with:
pGeoDatabase->GetDatasetDefinition(tables, type, tableDef)

and I get the same result.

Either there is a memory leak in the FileGDB API or I really missed something.

Here is the function called for every tables:
    Table* pTable = new Table();

    if (FAILED(hr = pGeoDatabase->OpenTable(tables, *pTable)))
    {
      delete pTable;

      wcout  << L"Error opening " << tables << ". Skipping it" << endl;
      continue;
    }

    string tableDef;

    if (FAILED(hr = pTable->GetDefinition(tableDef)))
    {
      pGeoDatabase->CloseTable(*pTable);
      delete pTable;

      wcout  << L"Failed at getting table definition for " << tables << endl;
      continue;
    }

    pGeoDatabase->CloseTable(*pTable);

    delete pTable;


Am I the only one who gets this ? Please post any idea to solve my problem...

Regards,

Sylvain
0 Kudos
2 Replies
by Anonymous User
Not applicable
Original User: lshipman

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.
0 Kudos
by Anonymous User
Not applicable
Original User: sbeaumont

Good news, thank you !

Is it possible to get a BETA version for the 1.4 version ?

Regards,

Sylvain
0 Kudos