Re: IdFTP - Memory Leak

Giganews Newsgroups
Subject: Re: IdFTP - Memory Leak
Posted by:  Serhan (ser…@kocbank.com.tr)
Date: Thu, 23 Jun 2005

And MemCheck says that :

Leak #0 User allocated memory (GetMem)
Size: 240
1 Occurence

Leak #1 User allocated memory (GetMem)
Size: 240
1 Occurence

Leak #2 User allocated memory (GetMem)
Size: 20
1 Occurence
call stack - 0 : (no debug info) Find error: 00000014
call stack - 1 : Module IdStack.pas Routine @Idstack@IdStackFactory Line
325 Find error: 0046E915
call stack - 2 : Module IdStack.pas Routine @Idstack@TIdStack@Make Line 530
Find error: 0046F22B
call stack - 3 : Module IdComponent.pas Routine
@Idcomponent@TIdComponent@InitComponent Line 226 Find error: 0046FCD3
call stack - 4 : Module IdTCPConnection.pas Routine
@Idtcpconnection@TIdTCPConnection@InitComponent Line 719 Find error:
0047BD07
call stack - 5 : Module IdExplicitTLSClientServerBase.pas Routine
@Idexplicittlsclientserverbase@TIdExplicitTLSClient@InitComponent Line 273
Find error: 0047D70F
call stack - 6 : Module IdFTP.pas Routine @Idftp@TIdFTP@InitComponent Line
1057 Find error: 004903AF
call stack - 7 : Module IdBaseComponent.pas Routine
@Idbasecomponent@TIdInitializerComponent@Create Line 189 Find error:
00468F68
call stack - 8 : Module classes.pas Routine CreateComponent Line 6096 Find
error: 0041B4B8
call stack - 9 : Module classes.pas(no debug info) Line 6144 Find error:
0041B6ED
call stack - 10 : Module classes.pas Routine @Classes@TReader@ReadDataInner
Line 6210 Find error: 0041B9A3
call stack - 11 : Module classes.pas Routine @Classes@TReader@ReadData Line
6189 Find error: 0041B8DC
call stack - 12 : Module classes.pas Routine @Classes@TComponent@ReadState
Line 9987 Find error: 0041E7D7
call stack - 13 : Module Controls.pas Routine @Controls@TControl@ReadState
Line 3357 Find error: 0043E02E
call stack - 14 : Module Controls.pas Routine
@Controls@TWinControl@ReadState Line 5475 Find error: 004425D1
call stack - 15 : Module Forms.pas Routine @Forms@TCustomForm@ReadState
Line 2723 Find error: 0045CDFE
call stack - 16 : Module classes.pas Routine
@Classes@TReader@ReadRootComponent Line 6566 Find error: 0041C79E
call stack - 17 : Module classes.pas Routine @Classes@TStream@ReadComponent
Line 4975 Find error: 004198F0
call stack - 18 : Module classes.pas Routine
@Classes@InternalReadComponentRes Line 2504 Find error: 00416099
call stack - 19 : Module classes.pas(no debug info) Line 2561 Find error:
0041626D
call stack - 20 : Module classes.pas Routine
@Classes@InitInheritedComponent Line 2573 Find error: 004162FF
call stack - 21 : Module Forms.pas Routine @Forms@TCustomForm@Create Line
2561 Find error: 0045C6A0
call stack - 22 : Module Forms.pas Routine @Forms@TApplication@CreateForm
Line 6946 Find error: 004659EB
call stack - 23 : Module FTPClient.dpr Routine initialization Line 14 Find
error: 00494BC9
call stack - 24 : (no debug info) Find error: 7C598939
call stack - 25 : (no debug info) Find error: FFFFFFFC

Leak #3 User allocated memory (GetMem)
Size: 16
1 Occurence
call stack - 0 : (no debug info) Find error: 0048F394
call stack - 1 : Module IdStack.pas Routine @Idstack@IdStackFactory Line
320 Find error: 0046E907
call stack - 2 : Module IdStack.pas Routine @Idstack@TIdStack@Make Line 530
Find error: 0046F22B
call stack - 3 : Module IdComponent.pas Routine
@Idcomponent@TIdComponent@InitComponent Line 226 Find error: 0046FCD3
call stack - 4 : Module IdTCPConnection.pas Routine
@Idtcpconnection@TIdTCPConnection@InitComponent Line 719 Find error:
0047BD07
call stack - 5 : Module IdExplicitTLSClientServerBase.pas Routine
@Idexplicittlsclientserverbase@TIdExplicitTLSClient@InitComponent Line 273
Find error: 0047D70F
call stack - 6 : Module IdFTP.pas Routine @Idftp@TIdFTP@InitComponent Line
1057 Find error: 004903AF
call stack - 7 : Module IdBaseComponent.pas Routine
@Idbasecomponent@TIdInitializerComponent@Create Line 189 Find error:
00468F68
call stack - 8 : Module classes.pas Routine CreateComponent Line 6096 Find
error: 0041B4B8
call stack - 9 : Module classes.pas(no debug info) Line 6144 Find error:
0041B6ED
call stack - 10 : Module classes.pas Routine @Classes@TReader@ReadDataInner
Line 6210 Find error: 0041B9A3
call stack - 11 : Module classes.pas Routine @Classes@TReader@ReadData Line
6189 Find error: 0041B8DC
call stack - 12 : Module classes.pas Routine @Classes@TComponent@ReadState
Line 9987 Find error: 0041E7D7
call stack - 13 : Module Controls.pas Routine @Controls@TControl@ReadState
Line 3357 Find error: 0043E02E
call stack - 14 : Module Controls.pas Routine
@Controls@TWinControl@ReadState Line 5475 Find error: 004425D1
call stack - 15 : Module Forms.pas Routine @Forms@TCustomForm@ReadState
Line 2723 Find error: 0045CDFE
call stack - 16 : Module classes.pas Routine
@Classes@TReader@ReadRootComponent Line 6566 Find error: 0041C79E
call stack - 17 : Module classes.pas Routine @Classes@TStream@ReadComponent
Line 4975 Find error: 004198F0
call stack - 18 : Module classes.pas Routine
@Classes@InternalReadComponentRes Line 2504 Find error: 00416099
call stack - 19 : Module classes.pas(no debug info) Line 2561 Find error:
0041626D
call stack - 20 : Module classes.pas Routine
@Classes@InitInheritedComponent Line 2573 Find error: 004162FF
call stack - 21 : Module Forms.pas Routine @Forms@TCustomForm@Create Line
2561 Find error: 0045C6A0
call stack - 22 : Module Forms.pas Routine @Forms@TApplication@CreateForm
Line 6946 Find error: 004659EB
call stack - 23 : Module FTPClient.dpr Routine initialization Line 14 Find
error: 00494BC9
call stack - 24 : (no debug info) Find error: 7C598939
call stack - 25 : (no debug info) Find error: FFFFFFFC
"Serhan" <ser…@kocbank.com.tr> wrote in message
news:6C04E20DCCCFE240ser…@kocbank.com.tr...
> Hi,
>
> I am working with Indy 10.0.52. (Delphi7, Win2000 Pro.) When uploading a
> file with IdFTP it leaks 516 bytes of memory according to MemCheck version
> 2.70.
>
> Is there anything wrong in the following code  ? ( FTP : IdFTP )
>
> Thanks,
>
> Serhan.
>
> procedure TForm1.Button2Click(Sender: TObject);
> begin
>
>  FTP.Host := 'aFTPserver';
>  FTP.Username := 'aUser';
>  FTP.Password := 'aPassword';
>  FTP.ConnectTimeout := 15000;
>  FTP.AutoLogin := True;
>
>  FTP.Connect;
>  FTP.Put('c:\aFile.txt', 'aFile.txt', false);
>  FTP.Disconnect;
>
> end;

Replies

In response to

IdFTP - Memory Leak posted by Serhan on Thu, 23 Jun 2005