- Unit Bar;
- Interface
- Uses
- Foo;
- Function GetFooList: TList;
- Implementation
- Var
- FooList: TList;
- Function GetFooList: TList;
- Begin
- If Not Assigned(FooList)
- Then FooList:=TList.Create;
- Result:=FooList;
- End;
- ...
- initialization
- finalization
- FreeAndNil(FooList);