SQL Server Parameter Memory Leak
Posted: Wed 09 Nov 2016 15:17
Hello,
environment : Delphi 2010, SQLServer 2012, Windows 7
we are experiencing a problem with memory leaks regarding "unused/uninitialized" parameters.
So for example i have:
If i execute that often enough, i see a memory leak, which is sadly enough, not detected by Eurekalog or anything else. Run it 3000 or more times and its clearly visible in taskmanager though.
Adding this :
Or putting any value to the second parameter will fix it. No leak, no problem. So its only a problem when one parameter is null/unassigned and therefore is of type ftUnknown inside of unidac.
I did run the same code against oracle and there is no problem.
No parameters other than shown above where used.
Could you please try to reproduce the issue.. and as i said, its not shown in Eurekalog. Make it a loop, 5000 times, 10000 times and it will show up.
edit : Tested with Unidac 6.3.13
environment : Delphi 2010, SQLServer 2012, Windows 7
we are experiencing a problem with memory leaks regarding "unused/uninitialized" parameters.
So for example i have:
Code: Select all
var
LUniQuery: TCustomDADataSet;
[....]
LUniQuery.ParamCheck := True;
LUniQuery.SQL.Add('select * from mytable where field1 = :param1 and field2 = :param2');
LUniQuery.Params[0].Value := 'Hello';
Adding this :
Code: Select all
LUniQuery.Params[1].Value := '';
I did run the same code against oracle and there is no problem.
No parameters other than shown above where used.
Could you please try to reproduce the issue.. and as i said, its not shown in Eurekalog. Make it a loop, 5000 times, 10000 times and it will show up.
edit : Tested with Unidac 6.3.13