FIX: Memory leak.

This commit is contained in:
cobines 2009-10-03 09:40:27 +00:00
commit 80d6ffdc5a

View file

@ -82,7 +82,8 @@ type
iPrevIndex: Integer;
function GetDefaultFlags(PluginFileName: String): PtrInt;
public
{ public declarations }
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;
end;
function ShowTweakPluginDlg(PluginType: TPluginType; PluginIndex: Integer): Boolean;
@ -171,7 +172,6 @@ begin
end;
end;
tmpWCXPlugins.Assign(FWCXPlugins);
FWCXPlugins.Free;
end;
ptWDX:
begin
@ -198,6 +198,20 @@ end;
{ TfrmTweakPlugin }
constructor TfrmTweakPlugin.Create(TheOwner: TComponent);
begin
FWCXPlugins := nil;
iPrevIndex := -1;
inherited;
end;
destructor TfrmTweakPlugin.Destroy;
begin
inherited;
if Assigned(FWCXPlugins) then
FreeAndNil(FWCXPlugins);
end;
procedure TfrmTweakPlugin.cbExtChange(Sender: TObject);
var
iFlags: PtrInt;