![]() |
ShellTreeView Memory Leak
Liste der Anhänge anzeigen (Anzahl: 1)
Ich bekomme bei ShellTreeViews ein Memory Leak sobald die Komponente nur auf der Form ist. Hat jemand dieses Leak auch mal gehabt bzw. gefunden an was es lag? Die Fehlermeldung ist leider ziemlich dürftig?
|
AW: ShellTreeView Memory Leak
Da ist doch was:
[DCC Warnung] ShellCtrls.pas(209): W1010 Methode 'Destroy' verbirgt virtuelle Methode vom Basistyp 'TCustomTreeView'
Delphi-Quellcode:
Beim destructor von TCustomShellTreeView stand kein ovveride. Wenn man das einfügt bekommt man nun folgende Fehlermeldung: ShellTreeView (so heißt die Instanz) hat kein übergeordnetes Fenster. ???
procedure TCustomShellTreeView.CreateWnd;
begin inherited CreateWnd; // ???????????????? if (Items.Count > 0) then ClearItems; if not Assigned(Images) then SetUseShellImages(FUseShellImages); { TODO : What is the Items.Count test for here? } if (not FLoadingRoot) {and (Items.Count = 0)} then CreateRoot; end; destructor TCustomShellTreeView.Destroy; // ************************* begin ClearItems; FRootFolder.Free; inherited; end; |
AW: ShellTreeView Memory Leak
Das löst die Exception aus.
Delphi-Quellcode:
Ich schreib das jetzt ohne die BeginEndUpdates in den destructor und gut ist. Kein Bock mehr..
procedure TCustomShellTreeView.ClearItems;
var I: Integer; begin Items.BeginUpdate; // **************** try for I := 0 to Items.Count-1 do begin if Assigned(Folders[i]) then Folders[I].Free; Items[I].Data := nil; end; Items.Clear; finally Items.EndUpdate; end; end; |
AW: ShellTreeView Memory Leak
Liste der Anhänge anzeigen (Anzahl: 1)
Jetzt muß ich doch noch mal nachfragen. Ich hab das Package entfernt und wollte es neu installieren. Nun will "er" das aber nicht. :oops:
|
AW: ShellTreeView Memory Leak
Zitat:
Das Dialogfenster mit den Packages nach dem Entfernen auch geschlossen und dann wieder geöffnet und dann erst das gleichnamige Package installiert? Im Notfall IDE neu gestartet? Ja ich weiss, sind banale Fragen, aber über solche lapidaren Sachen stolpert man manchmal, wenn man schon zu lange über eine Sache grübelt. |
AW: ShellTreeView Memory Leak
Zitat:
Das spart Speicherplatz und Bandbreite und schneller lesbar ist es auch noch ... und sogar suchbar, kurz gesagt nur Vorteile. Das Verfahren nennt sich im Übrigen CopyPaste ;) |
AW: ShellTreeView Memory Leak
Ach du meine Güte. Screenshots als PDF. Da sind wir wohl haarscharf an einem Word Dokument vorbei geschlittert. :shock:
|
AW: ShellTreeView Memory Leak
Hallo,
vielleicht hilft der ![]() Zitat:
Klaus |
AW: ShellTreeView Memory Leak
Ob ich diesem Leben mal noch von Luckie eine gescheite Antwort bekomm? :gruebel: Ich fürchte nein..
BadenPower, ja, "ordentlich" entfernt (nicht nur das Häkchen weggemacht). Und Ide neu gestartet. Auch Windows. Sir Rufo, falls du damit was anfangen kannst, bitte sehr:
Code:
[2166EA47]{delphicoreide100.bpl} PakList.TPackageList.AddPackage (Line 441, "PakList.pas" + 7) + $2F
[2167AA36]{delphicoreide100.bpl} BasePasProjOpts.TProjOptsManager.InstallPackage (Line 2271, "BasePasProjOpts.pas" + 8) + $5 [2167E777]{delphicoreide100.bpl} BasePasProjOpts.TProjectOptions.InstallPackage (Line 3287, "BasePasProjOpts.pas" + 0) + $3 [216A36E1]{delphicoreide100.bpl} PasMgr.TPascalPackageCodeUpdater.InstallPackage (Line 11185, "PasMgr.pas" + 17) + $19 [21669A25]{delphicoreide100.bpl} PkgContainers.TStdPackageProjectContainer.CommandHandler (Line 151, "PkgContainers.pas" + 5) + $5 [209F21D9]{coreide100.bpl} Containers.TStdContainer.CommandHandler (Line 3069, "Containers.pas" + 1) + $17 [201305E7]{vcl100.bpl } Menus.TMenuItem.Click (Line 2283, "Menus.pas" + 14) + $8 [20131B0F]{vcl100.bpl } Menus.TMenu.DispatchCommand (Line 3008, "Menus.pas" + 5) + $2 [20132C6E]{vcl100.bpl } Menus.TPopupList.WndProc (Line 3798, "Menus.pas" + 4) + $E [20132BBD]{vcl100.bpl } Menus.TPopupList.MainWndProc (Line 3779, "Menus.pas" + 2) + $5 [20040E4C]{rtl100.bpl } Classes.StdWndProc (Line 11583, "common\Classes.pas" + 8) + $0 [201625F0]{vcl100.bpl } Forms.TApplication.ProcessMessage (Line 8105, "Forms.pas" + 23) + $1 [2016262A]{vcl100.bpl } Forms.TApplication.HandleMessage (Line 8124, "Forms.pas" + 1) + $4 [2016291F]{vcl100.bpl } Forms.TApplication.Run (Line 8223, "Forms.pas" + 20) + $3 [0042297A]{bds.exe } bds.bds (Line 195, "" + 7) + $7 |
AW: ShellTreeView Memory Leak
Klaus, genau so hab ich es gemacht :thumb:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:27 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