begin
FList[i].Free;
FList[i]:=nil;
end;
Finalize(Flist);
inherited;
end;
function TFooManager.GetFooByID(id: integer): IFoo;
begin
result:=FList[id] as IFoo;
end;
function TFooManager.GetFooNum: integer;
begin
result:=FooNum;
end;
Dll中仅有的两个导出函数:
function GetFooManIntf:IFooManager;stdcall;
begin
if not assigned(FooMan) then
begin
FooMan:=TFooManager.Create;
end;
result:=FooMan as IFooManager;
end;
procedure FreeLib;stdcall;
//释放工厂类
begin
if assigned(FooMan) then
begin
FooMan.Free;
FooMan:=nil;
end;
end;
上一页 [1] [2] [3] |