We use FastMM4 unit to explore the memory leaks in our application. After we upgrade to the latest ODAC (8.2) package we are experiencing some memory leaks. With ODAC 8.1 we haven't got this problem.
This is how we can produce some memory leaks with CLOB field:
Oracle code:
Code: Select all
CREATE TABLE T_CLOBTEST (
ID NUMBER(9) PRIMARY KEY,
CLOBDATA CLOB
);
INSERT INTO T_CLOBTEST(ID) VALUES (1);
COMMIT;OraQuery1.SQL:
SELECT ID, CLOBDATA
FROM T_CLOBTEST
WHERE ID = :iID
OraQuery1.SQLInsert:
INSERT INTO T_CLOBTEST (ID, CLOBDATA)
VALUES (:ID, EMPTY_CLOB())
RETURNING CLOBDATA INTO :CLOBDATA
Code: Select all
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DB, DBAccess, Ora, MemDS;
type
TForm1 = class(TForm)
OraQuery1: TOraQuery;
OraSession1: TOraSession;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses FastMM4;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
OraQuery1.Close;
OraQuery1.ParamByName('iID').AsInteger := 1;
OraQuery1.Open;
OraQuery1.Close;
OraQuery1.ParamByName('iID').AsInteger := -1;
OraQuery1.Open;
OraQuery1.Append;
OraQuery1.FieldByName('ID').AsInteger := 2;
OraQuery1.FieldByName('CLOBDATA').AsString := 'TEST';
OraQuery1.Post;
OraQuery1.Close;
end;
end.Best regards,
Balazs Miereisz