Ralf Barth
Member
We were struggling some time, looking for a memory leak in our data access application. Oddly enough, nobody had the same problem (no one posted it), so we couldn't imaging, that the cause was in the DOA code.
Now we found something in the oracledata.pas. the changes i made were solving our problems, maybe they are helpful for others too.
I inserted 2 lines to free the TLOBLocator and the LOBList. My additional lines ar marked with the "// rb, ..." comments.
function TOracleDataSet.PSExecuteStatement(const ASQL: string; AParams: TParams;
ResultSet: Pointer = nil): Integer;
...
// Write the LOB's
if Result > 0 then for l := 0 to LOBList.Count - 1 do
begin
LOB := LOBList[l];
s := AParams[LOB.Tag].AsBlob;
if Length(s) > 0 then
begin
if LOB.LOBType = otCLOB then s := RemoveCR(s, Session);
LOB.Write(s[1], Length(s));
end;
// rb, 19.06.2006, memleack
LOB.free;
end;
// rb, 19.06.2006, memleack
LOBList.Free;
except
on E:Exception do
begin
...
But maybe the changes are stupid and someone could help me to find the right solution.
Regards,
Ralf
Now we found something in the oracledata.pas. the changes i made were solving our problems, maybe they are helpful for others too.
I inserted 2 lines to free the TLOBLocator and the LOBList. My additional lines ar marked with the "// rb, ..." comments.
function TOracleDataSet.PSExecuteStatement(const ASQL: string; AParams: TParams;
ResultSet: Pointer = nil): Integer;
...
// Write the LOB's
if Result > 0 then for l := 0 to LOBList.Count - 1 do
begin
LOB := LOBList[l];
s := AParams[LOB.Tag].AsBlob;
if Length(s) > 0 then
begin
if LOB.LOBType = otCLOB then s := RemoveCR(s, Session);
LOB.Write(s[1], Length(s));
end;
// rb, 19.06.2006, memleack
LOB.free;
end;
// rb, 19.06.2006, memleack
LOBList.Free;
except
on E:Exception do
begin
...
But maybe the changes are stupid and someone could help me to find the right solution.
Regards,
Ralf