高手解答,INDY问题200分送上??? ( 积分: 200 )

  • 主题发起人 主题发起人 kmwap
  • 开始时间 开始时间
K

kmwap

Unregistered / Unconfirmed
GUEST, unregistred user!
var
i,k: Integer;
IdDNSResolver :TIdDNSResolver;
begin
try
k := 0 ;
IdDNSResolver := TIdDNSResolver.Create(nil);
IdDNSResolver.ReceiveTimeout :=400;
while k<DNSCount do
begin
with IdDNSResolver do
begin
Host := DNS[k];
QueryRecords := [qtMX];
try
Resolve(AQName);//据观察就是因为用了这句
Active;
for i := 0 to QueryResult.Count-1 do if QueryResult IS TMxRecord then AMxList.Add(TMXRecord(QueryResult).ExchangeServer);
if AMxList.Count > 0 then k := DNSCount;
except
end;
end;
IdDNSResolver.QueryResult.Clear;
inc(k);
end;
IdDNSResolver.Destroy;
except
end;
end;


反复执等一段时间后为什么内存不停的增长???
 
var
i,k: Integer;
IdDNSResolver :TIdDNSResolver;
begin
try
k := 0 ;
IdDNSResolver := TIdDNSResolver.Create(nil);
IdDNSResolver.ReceiveTimeout :=400;
while k<DNSCount do
begin
with IdDNSResolver do
begin
Host := DNS[k];
QueryRecords := [qtMX];
try
Resolve(AQName);//据观察就是因为用了这句
Active;
for i := 0 to QueryResult.Count-1 do if QueryResult IS TMxRecord then AMxList.Add(TMXRecord(QueryResult).ExchangeServer);
if AMxList.Count > 0 then k := DNSCount;
except
end;
end;
IdDNSResolver.QueryResult.Clear;
inc(k);
end;
IdDNSResolver.Destroy;
except
end;
end;


反复执等一段时间后为什么内存不停的增长???
 
高手呢?为什么我的问题都是无人能答???
 
帮你顶上去,看看有没有人看到吧[:)]
 
高手在哪???
 
AMxList.Add(TMXRecord(QueryResult).ExchangeServer);
循环有问题
这个会一直在加
 
后退
顶部