Einzelnen Beitrag anzeigen

Benutzerbild von Sanchez
Sanchez

Registriert seit: 24. Apr 2003
Ort: Neumarkt Stmk
892 Beiträge
 
Delphi XE6 Enterprise
 
#1

IdHttp mit BasicAuthentication frisst Speicher

  Alt 23. Jun 2005, 14:37
Hallo,
Wie kann ich verhindern, dass die IdHttp-Komponente bei Aufruf von Get Speicher frisst, wenn Request.BasicAuthentication true ist?

Ich hab eine IdHttp-Instanz aufs Formular gepackt, BasicAuthentication eingeschaltet, einen Benutzer und ein Passwort eingegeben und eine beliebige Seite mit Get aufgerufen. Das ganze kostet 112 bytes Speicher.

Hier das MemCheck-Log:
Zitat:
MemCheck version 2.73

Total leak: 112 bytes


*** MEMCHK: Blocks STILL allocated ***

Leak #0 User allocated memory (GetMem)
Size: 32
1 Occurence
call stack - 0 : (no debug info) Find error: 00000004
call stack - 1 : Routine @Classes@TStringList@AddObject Find error: 00417510
call stack - 2 : Routine @Idhttpheaderinfo@TIdRequestHeaderInfo@SetHeaders Find error: 0045F347
call stack - 3 : Routine @Idhttp@TIdHTTPProtocol@BuildAndSendRequest Find error: 00467F08
call stack - 4 : Routine @Idhttp@TIdCustomHTTP@ConnectToHost Find error: 00466F64
call stack - 5 : Routine @Idhttp@TIdCustomHTTP@DoRequest Find error: 004670FE
call stack - 6 : Routine @Idhttp@TIdCustomHTTP@Get Find error: 00466289
call stack - 7 : Module Unit1.pas Routine @Unit1@TForm1@Button1Click Line 54 Find error: 00468B2A
call stack - 8 : Routine @Controls@TWinControl@WndProc Find error: 00434124
call stack - 9 : Routine @Controls@DoControlMsg Find error: 0043425C
call stack - 10 : Routine @Controls@TWinControl@WndProc Find error: 00434124
call stack - 11 : Routine @Controls@TWinControl@MainWndProc Find error: 00433D9F
call stack - 12 : Routine @Classes@StdWndProc Find error: 0041CEBA
call stack - 13 : (no debug info) Find error: 77D18705
call stack - 14 : (no debug info) Find error: 77D187E7
call stack - 15 : (no debug info) Find error: 77D1B73F
call stack - 16 : (no debug info) Find error: 77D1B7A7
call stack - 17 : (no debug info) Find error: 77D4FC99
call stack - 18 : (no debug info) Find error: 77D4652C
call stack - 19 : (no debug info) Find error: 77D28382
call stack - 20 : (no debug info) Find error: 77D28876
call stack - 21 : (no debug info) Find error: 77D18705
call stack - 22 : (no debug info) Find error: 77D187E7
call stack - 23 : (no debug info) Find error: 77D1C00A
call stack - 24 : (no debug info) Find error: 77D1E362
call stack - 25 : Routine @Controls@TWinControl@DefaultHandler Find error: 00434208
call stack - 26 : Routine @Controls@TWinControl@WndProc Find error: 00434124

Leak #1 Instance of TIdHeaderList
Size: 60
1 Occurence
call stack - 0 : Routine @Idhttp@TIdHTTPProtocol@BuildAndSendRequest Find error: 00467F08
call stack - 1 : Routine @Idhttp@TIdCustomHTTP@ConnectToHost Find error: 00466F64
call stack - 2 : Routine @Idhttp@TIdCustomHTTP@DoRequest Find error: 004670FE
call stack - 3 : Routine @Idhttp@TIdCustomHTTP@Get Find error: 00466289
call stack - 4 : Module Unit1.pas Routine @Unit1@TForm1@Button1Click Line 54 Find error: 00468B2A
call stack - 5 : Routine @Controls@TWinControl@WndProc Find error: 00434124
call stack - 6 : Routine @Controls@DoControlMsg Find error: 0043425C
call stack - 7 : Routine @Controls@TWinControl@WndProc Find error: 00434124
call stack - 8 : Routine @Controls@TWinControl@MainWndProc Find error: 00433D9F
call stack - 9 : Routine @Classes@StdWndProc Find error: 0041CEBA
call stack - 10 : (no debug info) Find error: 77D18705
call stack - 11 : (no debug info) Find error: 77D187E7
call stack - 12 : (no debug info) Find error: 77D1B73F
call stack - 13 : (no debug info) Find error: 77D1B7A7
call stack - 14 : (no debug info) Find error: 77D4FC99
call stack - 15 : (no debug info) Find error: 77D4652C
call stack - 16 : (no debug info) Find error: 77D28382
call stack - 17 : (no debug info) Find error: 77D28876
call stack - 18 : (no debug info) Find error: 77D18705
call stack - 19 : (no debug info) Find error: 77D187E7
call stack - 20 : (no debug info) Find error: 77D1C00A
call stack - 21 : (no debug info) Find error: 77D1E362
call stack - 22 : Routine @Controls@TWinControl@DefaultHandler Find error: 00434208
call stack - 23 : Routine @Controls@TWinControl@WndProc Find error: 00434124
call stack - 24 : Routine @Classes@StdWndProc Find error: 0041CEBA
call stack - 25 : (no debug info) Find error: 77D18705
call stack - 26 : (no debug info) Find error: 77D187E7

Leak #2 Instance of TIdBasicAuthentication
Size: 20
1 Occurence
call stack - 0 : Routine @Idhttp@TIdHTTPProtocol@BuildAndSendRequest Find error: 00467F08
call stack - 1 : Routine @Idhttp@TIdCustomHTTP@ConnectToHost Find error: 00466F64
call stack - 2 : Routine @Idhttp@TIdCustomHTTP@DoRequest Find error: 004670FE
call stack - 3 : Routine @Idhttp@TIdCustomHTTP@Get Find error: 00466289
call stack - 4 : Module Unit1.pas Routine @Unit1@TForm1@Button1Click Line 54 Find error: 00468B2A
call stack - 5 : Routine @Controls@TWinControl@WndProc Find error: 00434124
call stack - 6 : Routine @Controls@DoControlMsg Find error: 0043425C
call stack - 7 : Routine @Controls@TWinControl@WndProc Find error: 00434124
call stack - 8 : Routine @Controls@TWinControl@MainWndProc Find error: 00433D9F
call stack - 9 : Routine @Classes@StdWndProc Find error: 0041CEBA
call stack - 10 : (no debug info) Find error: 77D18705
call stack - 11 : (no debug info) Find error: 77D187E7
call stack - 12 : (no debug info) Find error: 77D1B73F
call stack - 13 : (no debug info) Find error: 77D1B7A7
call stack - 14 : (no debug info) Find error: 77D4FC99
call stack - 15 : (no debug info) Find error: 77D4652C
call stack - 16 : (no debug info) Find error: 77D28382
call stack - 17 : (no debug info) Find error: 77D28876
call stack - 18 : (no debug info) Find error: 77D18705
call stack - 19 : (no debug info) Find error: 77D187E7
call stack - 20 : (no debug info) Find error: 77D1C00A
call stack - 21 : (no debug info) Find error: 77D1E362
call stack - 22 : Routine @Controls@TWinControl@DefaultHandler Find error: 00434208
call stack - 23 : Routine @Controls@TWinControl@WndProc Find error: 00434124
call stack - 24 : Routine @Classes@StdWndProc Find error: 0041CEBA
call stack - 25 : (no debug info) Find error: 77D18705
call stack - 26 : (no debug info) Find error: 77D187E7

*** MEMCHK: End of allocated blocks ***


*** MEMCHK: Chronological leak information ***

* Instance of TIdBasicAuthentication (Leak #2) Size: 20
* Instance of TIdHeaderList (Leak #1) Size: 60
* User allocated memory (GetMem) (Leak #0) Size: 32

*** MEMCHK: End of chronological leak information ***


*** MEMCHK: Blocks written to after destruction ***

Bad blocks count: 0


*** MEMCHK: End of blocks written to after destruction ***
Was kann ich dagegen machen?

grüße, daniel
Daniel
Testen ist feige!
  Mit Zitat antworten Zitat