public
{ Public declarations }
destructor destroy
override;
...................................
destructor TLD.destroy;
var
i: Integer;
begin
//做类似的资源和内存处理
with DMStorage, LeaseHoldDM, SysDM do
for i := 0 to ComponentCount - 1 do
begin
if Components is TSocketConnection then
TSocketConnection(Components).Close;
if Components is TClientDataSet then
TClientDataSet(Components).close;
end;
//
inherited;
end;