Memory leak MyDac 7.1.4 on large field lists
Posted: Wed 04 Jan 2012 17:52
Hi,
Using a large field list and a WHERE clause in to call MySQL V5.5 and then using MyQuery.fieldByName function causes a memory leak.
It does appear to depend on the table structure you are calling.
MyQuery := TMyQuery.Create(Nil);
MyQuery.Connection := SQL_C; (connected TMyConnection)
MyQuery.Close;
MyQuery.SQL.Clear;
MyQuery.SQL.Add(' SELECT * ');
MyQuery.SQL.Add(' FROM ');
MyQuery.SQL.Add(' livedata ');
MyQuery.SQL.Add(' WHERE ');
MyQuery.SQL.Add(' VehicleServerID = 1);
MyQuery.Open;
UnitMake := MyQuery.FieldByName('VehicleUnitMake').AsString;
MyQuery.Destroy;
It only appears to affect string values and takes around 8192 bytes on every call.
If you need the table I am using I am happy to send this as an export.
Thanks In Advance
Nigel
Using a large field list and a WHERE clause in to call MySQL V5.5 and then using MyQuery.fieldByName function causes a memory leak.
It does appear to depend on the table structure you are calling.
MyQuery := TMyQuery.Create(Nil);
MyQuery.Connection := SQL_C; (connected TMyConnection)
MyQuery.Close;
MyQuery.SQL.Clear;
MyQuery.SQL.Add(' SELECT * ');
MyQuery.SQL.Add(' FROM ');
MyQuery.SQL.Add(' livedata ');
MyQuery.SQL.Add(' WHERE ');
MyQuery.SQL.Add(' VehicleServerID = 1);
MyQuery.Open;
UnitMake := MyQuery.FieldByName('VehicleUnitMake').AsString;
MyQuery.Destroy;
It only appears to affect string values and takes around 8192 bytes on every call.
If you need the table I am using I am happy to send this as an export.
Thanks In Advance
Nigel