Memory leak on versions 2.50.1.0 and 4.20.0.7
Posted: Tue 26 Feb 2008 14:46
Hi,
We have had problems of memory leaks when we use ftFMTBcd parameters, like the sample bellow:
Query.SQL.Text := 'SELECT * FROM T1 WHERE F1 = :F1';
Query.ParamByName('F1').DataType := ftFMTBcd;
Query.ParamByName('F1').Value := 123;
Query.Open;
If you put this in a loop, 1500 times each interaction on a button click, the memory shown at TaskManager will increase quickly.
In a real application, this is causing "Out of Memory" errors and requiring application restart.
The problem does not happen in Oracle 8 using the driver 2.50.1.0, but it happens with any other configuration, does not matter the Oracle's version or driver's version.
We changed the parameter's DataType to ftInteger (or ftCurrency, or ftFloat, depending on the case), but now the error "EBcdOverflowException: BCD overflow" is happening on Stored Procedures calls.
By doing these tests, we noticed when we use EnabledBCD, the max number of decimal places that is returned from a SELECT statement is 4. With ftFMTBcd parameters we only can INSERT until 4 decimals too, but using ftFloat we can INSERT until the limit of Double precision 15 digits.
We still do not have a work arround for this problem, due to Stored Procedure parameter error.
Any help is welcome.
Thanks.
We have had problems of memory leaks when we use ftFMTBcd parameters, like the sample bellow:
Query.SQL.Text := 'SELECT * FROM T1 WHERE F1 = :F1';
Query.ParamByName('F1').DataType := ftFMTBcd;
Query.ParamByName('F1').Value := 123;
Query.Open;
If you put this in a loop, 1500 times each interaction on a button click, the memory shown at TaskManager will increase quickly.
In a real application, this is causing "Out of Memory" errors and requiring application restart.
The problem does not happen in Oracle 8 using the driver 2.50.1.0, but it happens with any other configuration, does not matter the Oracle's version or driver's version.
We changed the parameter's DataType to ftInteger (or ftCurrency, or ftFloat, depending on the case), but now the error "EBcdOverflowException: BCD overflow" is happening on Stored Procedures calls.
By doing these tests, we noticed when we use EnabledBCD, the max number of decimal places that is returned from a SELECT statement is 4. With ftFMTBcd parameters we only can INSERT until 4 decimals too, but using ftFloat we can INSERT until the limit of Double precision 15 digits.
We still do not have a work arround for this problem, due to Stored Procedure parameter error.
Any help is welcome.
Thanks.