Page 1 of 1

Free memory after reading record in TOraQuery

Posted: Mon 23 Aug 2010 09:17
Hello,

I have that kind of code:

(...)

// geom is column type of SDO_GEOMETRY. There are many rows in table TABLE_WITH_GEOMETRY
// parameter "FetchRows" is set 25

query->SQL->Add( "SELECT geom FROM TABLE_WITH_GEOMETRY" );
query->Open();

TOraObject *OraGeometry;

while ( !query->Eof )
{
OraGeometry = query->GetObject( "geom" );


// data procesing


OraGeometry->FreeObject();

query->Next();
}

My problem is: execution command "query->Next()" doesn't free memory taken by previous record. I would like to release previous record from memory because I don't need it any more.
Because I can't do it now I have huge leak of memory and I can't to process all records from table.

Is it possible to free that memory in some way?

Regards,

Wojto

Posted: Fri 27 Aug 2010 12:24
by AlexP
Hello,

To reduce memory usage, you can set
OraQuery->UniDirectional property to true.

For more information about the UniDirectional property, read ODAC help about 'TTCustomDADataSet.UniDirectional'

Posted: Thu 02 Sep 2010 12:17
It works. Thank's for your help.

Regards
Wojto