Dear developers!
I found error in TLOBLocator.Destroy
OCICall raise exception in Destructor!!!.
sample:
I found error in TLOBLocator.Destroy
Code:
......TLOBLocator.Destroy......
...
if (FLOB <> nil) then
begin
PLOB := @FLOB;
if Temporary then
// in this line
OCICall(OCILOBFreeTemporary(Session.svchp, errhp, FLOB));
OCIDescriptorFree(FLOB, LOBDType);
end;
...
OCICall raise exception in Destructor!!!.
sample:
Code:
var
LOB: TLOBLocator;
begin
OraSession.LogOn;
LOB := TLOBLocator.CreateTemporary(OraSession, NewVarType, False);
try
...
set LOB as complex var
execute TOracleQuery
..
LOB.Read(...);
OraSession.LogOff; // as sample
finally
LOB.Free; // Exception!!
end;
// Memory Leak!!!! Do not destroy LOB, because Exception
end;
Last edited: