I've found strange memory leak in TOraSQL class
It happens when:
- Using Direct connection mode
Type of parameter is not defined

Delphi XE 7 Pro
ODAC 9.7.24 Pro
Sources:
Code: Select all
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, DBAccess, Ora, OraCall, Data.DB, OdacVcl;
type
TForm1 = class(TForm)
OraSession1: TOraSession;
SQL1: TOraSQL;
ConnectDialog1: TConnectDialog;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
OraSession1.Connect;
SQL1.Execute;
end;
end.
Code: Select all
object Form1: TForm1
Left = 0
Top = 0
Caption = 'Form1'
ClientHeight = 136
ClientWidth = 241
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object OraSession1: TOraSession
Options.Direct = True
Username = 'test'
Server = '192.168.0.177:1522:TEST'
ConnectDialog = ConnectDialog1
Left = 32
Top = 16
EncryptedPassword = '8CFF92FF8BFF'
end
object SQL1: TOraSQL
SQL.Strings = (
'declare'
' v_COUNT integer;'
' v_RESULT boolean;'
'begin'
' select count(1)'
' into v_COUNT'
' from inw_rozl_mag rm'
' where rm.status = '#39'W TOKU'#39';'
''
' v_RESULT := v_COUNT = 0;'
' :RESULT := sys.DIUTIL.BOOL_TO_INT(v_RESULT);'
'end;')
Left = 136
Top = 16
ParamData = <
item
DataType = ftUnknown
Name = 'RESULT'
Value = nil
end>
end
object ConnectDialog1: TConnectDialog
Caption = 'Connect'
ConnectButton = 'Connect'
CancelButton = 'Cancel'
Server.Caption = 'Server'
Server.Visible = True
Server.Order = 1
UserName.Caption = 'User Name'
UserName.Visible = True
UserName.Order = 2
Password.Caption = 'Password'
Password.Visible = True
Password.Order = 3
Home.Caption = 'Home Name'
Home.Visible = False
Home.Order = 0
Direct.Caption = 'Direct'
Direct.Visible = False
Direct.Order = 6
Schema.Caption = 'Schema'
Schema.Visible = False
Schema.Order = 4
Role.Caption = 'Connect Mode'
Role.Visible = False
Role.Order = 5
Left = 32
Top = 80
end
end
Regards
P.C.