![]() |
Re: Memory Leak bei INDY 10 in der SMTP Komponente?
Hallo,
folgende Änderungen in der Datei idStack.pas sind notwendig, sonst kann es knallen (was ja der Grund für den Leak ist): Nach Implementation:
Delphi-Quellcode:
wird zu
var
GInstanceCount: Integer = 0; GStackCriticalSection: TIdCriticalSection;
Delphi-Quellcode:
Die Methode TIdStack.DecUsage muss erweitert werden:
var
GInstanceCount: Integer = 0; GStackCriticalSection: TIdCriticalSection; GDestroying: Boolean; // Neue Variable
Delphi-Quellcode:
und am Ende:
...
finally GStackCriticalSection.Release; end; // Auf Destroying reagieren if (GInstanceCount = 0) and GDestroying then Sys.FreeAndNil(GStackCriticalSection); end;
Delphi-Quellcode:
//Edit: Meine Lösung gilt für Version Version 10, jbg's für Version 9.
finalization
GDestroying := True; if GInstanceCount = 0 then Sys.FreeAndNil(GStackCriticalSection); Gruß xaromz |
Re: Memory Leak bei INDY 10 in der SMTP Komponente?
Hi,
Wenn ich das versuche zu compilieren (D2006/Indy10) dann bekomme ich die Fehlermeldung: [Pascal Fataler Fehler] IndySystem.dpk(29): E2202 Package 'Borland.Delphi' wird benötigt, konnte aber nicht gefunden werden. Wo soll das denn stecken? Gruss EL |
Re: Memory Leak bei INDY 10 in der SMTP Komponente?
Hallo,
Zitat:
Lösung hab' ich leider keine. Ich habe einfach den Suchpfad meines Projekts angepasst und kompiliere die Units in meine Anwendung mit rein. Gruß xaromz |
Re: Memory Leak bei INDY 10 in der SMTP Komponente?
Zitat:
|
Re: Memory Leak bei INDY 10 in der SMTP Komponente?
Zitat:
Wie? Gruss EL |
Re: Memory Leak bei INDY 10 in der SMTP Komponente?
Zitat:
Delphi-Quellcode:
behalten, oder ersetzen?
{$IFDEF IDFREEONFINAL}
Sys.FreeAndNil(GStackCriticalSection); {$ENDIF} Gruss EL |
Re: Memory Leak bei INDY 10 in der SMTP Komponente?
Hallo,
Zitat:
Delphi-Quellcode:
Gruß
initialization
GDestroying := False; GStackClass := {$IFDEF LINUX} TIdStackLinux; {$ENDIF} {$IFDEF MSWINDOWS} TIdStackWindows; {$ENDIF} {$IFDEF DOTNET} TIdStackDotNet; {$ENDIF} GStackCriticalSection := TIdCriticalSection.Create; finalization GDestroying := True; if GInstanceCount = 0 then Sys.FreeAndNil(GStackCriticalSection); end. xaromz |
Re: Memory Leak bei INDY 10 in der SMTP Komponente?
Zitat:
und wie nun compilieren? Gruss EL |
Re: Memory Leak bei INDY 10 in der SMTP Komponente?
Zitat:
Wie muss ich nun verfahren, um die Indylib neu zu bauen? Gruss EL |
Re: Memory Leak bei INDY 10 in der SMTP Komponente?
- ich pushe dieses Thema noch einmal, weil Borland einer Anfrage nicht nachkommt und auf den kostenpflichtigen Support verweist. -
Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:18 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz