mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-24 02:49:19 +02:00
* replaced TObjectList by TList because it generated a
winunits-base <-> fcl-base dependancy conflict. git-svn-id: trunk@13877 -
This commit is contained in:
parent
3f75bea982
commit
e6fe8300be
@ -21,7 +21,7 @@ unit comobj;
|
|||||||
{define DEBUG_COM}
|
{define DEBUG_COM}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Windows,Types,Variants,Sysutils,ActiveX,contnrs;
|
Windows,Types,Variants,Sysutils,ActiveX,classes;
|
||||||
|
|
||||||
type
|
type
|
||||||
EOleError = class(Exception);
|
EOleError = class(Exception);
|
||||||
@ -74,7 +74,7 @@ unit comobj;
|
|||||||
|
|
||||||
TComClassManager = class(TObject)
|
TComClassManager = class(TObject)
|
||||||
private
|
private
|
||||||
fClassFactoryList: TObjectList;
|
fClassFactoryList: TList;
|
||||||
public
|
public
|
||||||
constructor Create;
|
constructor Create;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -462,12 +462,18 @@ implementation
|
|||||||
|
|
||||||
constructor TComClassManager.Create;
|
constructor TComClassManager.Create;
|
||||||
begin
|
begin
|
||||||
fClassFactoryList := TObjectList.create(true);
|
fClassFactoryList := TList.create({true});
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
destructor TComClassManager.Destroy;
|
destructor TComClassManager.Destroy;
|
||||||
|
var i : integer;
|
||||||
begin
|
begin
|
||||||
|
if fClassFactoryList.count>0 Then
|
||||||
|
begin
|
||||||
|
for i:=fClassFactoryList.count-1 downto 0 do
|
||||||
|
tobject(fClassFactoryList[i]).Free;
|
||||||
|
end;
|
||||||
fClassFactoryList.Free;
|
fClassFactoryList.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user