Вниз
Скачать: CL | DM;

KOLOLEDB memory leak ?   Найти похожие ветки 

 
Boguslaw   (2008-08-15 18:53) [0]

Hello all !

I"m not very active here but in fact I"m using KOL daily in my work.
I"m using now extensively OLEDB package from KOL to move big data to SQL Server and probably found a memory leak. I don"t know if my KOLOLEDB package is up to time so Vladimir please compare and adjust.
The leak is in Execute method : pWideChar is not freed by using SysFreeString. For small commands this is nothing but I had to move hundreds of megabytes which ended with OutOf Memory problem.

Below is fixed version.

BTW I converted MemCheck to KOL but cannot force it to work. It compiles fine.Anybody willing to help ? I think it would be very nice addition to KOL to remove all memleaks in KOL programs easily.

procedure TQuery.Execute;
var
fWText : PWideChar;
begin
 ClearRowset;
 fWText := StringToOleStr( fText );
 // first set txt to fCommand just before execute
 if CheckOLE( fCommand.SetCommandText( @DBGUID_DBSQL, fWText ) ) then
   CheckOLE( fCommand.Execute( nil, IID_NULL, nil, @fRowsAffected, nil ) );
 SysFreeString(fWText);
end;


 
Boguslaw   (2008-08-25 19:02) [1]

Fixed ????


 
exero   (2008-08-25 20:12) [2]

FastMM4 work fine



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.043 c
2-1269469596
s_t_d
2010-03-25 01:26
2010.08.27
Ступор при редактировании поля VARCHAR с пом. FIBPLus


2-1270652923
Vincero
2010-04-07 19:08
2010.08.27
Отловить состояние клавиши [Shift] при нажатии на пункт PopupMenu


15-1265361958
Ghost
2010-02-05 12:25
2010.08.27
Nokia 3110c передача *.txt по синезубу


15-1272573005
Юрий
2010-04-30 00:30
2010.08.27
С днем рождения ! 30 апреля 2010 пятница


15-1268602203
Юрий
2010-03-15 00:30
2010.08.27
С днем рождения ! 15 марта 2010 понедельник




   Наверх