list memory leak

Giganews Newsgroups
Subject: list memory leak
Posted by:  Jon Lennart Aasenden (po…@jurasoft.no)
Date: 1/11/2005 6:27:23 AM

Whenever i execute a list command, 40kb is allocated but never released when the connection is closed - or when the component is freed.
This simple example should demonstrate:

1. Put this inside a timer...

  var
    x:  Integer;
    FTemp:  TStringList;
  begin
    Caption:=IntToStr(allocmemsize);
    ftp.Host:='remotehost';
    ftp.Username:='username';
    ftp.Password:='password';
    ftp.Port:=21;

    ftp.Connect;

    FTemp:=TStringList.Create;
    try
      ftp.List(FTemp,'',false);
    finally
      FTemp.free;
    end;

    ftp.Disconnect;

Somthing is being allocated from the heap memory, but not released again.

--
Posted by ELK News Web

Replies