Hello
I have a Delphi application for processing reports from an Oracle database.
After I get well into the report (about 2000 rows), I run out of memory. The application works like this:
if VDataSetRows.Count > 0 then
begin
for i := 2 to VDataSetRows.Count - 1 do
begin
AVirtualTable.Append ;
VDataSetRow := TDataSetRow(VDataSetRows.Items ) ;
for j := 0 to VDataSetRow.DataSetFields.Count - 1 do
begin
VDataSetField := TDataSetField( VDataSetRow.DataSetFields.Items[j] ) ;
VFindField := AVirtualTable.FieldByName( VDataSetField.FieldName ) ;
if VFindField NIL then
begin
if VFindField.DataType = ftFloat then
VFindField.AsFloat :=
else if VFindField.DataType = ftInteger then
VFindField.AsInteger :=
else if VFindField.DataType = ftBoolean then
VFindField.AsBoolean :=
else
VFindField.AsString :=
end ;
end ;
AVirtualTable.Post ;
end ;
if VDataSetRows.Count > 2 then
AVirtualTable.First ;
end ;
I have 1 gigabyte of ram on my desktop machine, so I should not be running out of memory.
Does anybody know what I should be doing, what I should be closing, or where I should be freeing something to conserve this memory?
By the way , i used the TClientDataSet instead of TVirtualTable for a test and everything went OK.
Any ideas ?