mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Memory leak
This commit is contained in:
parent
e4bcd1ecfa
commit
e52a470178
1 changed files with 9 additions and 6 deletions
|
|
@ -343,19 +343,22 @@ end;
|
|||
|
||||
procedure TfrmFileProperties.ShowFile(iIndex:Integer);
|
||||
var
|
||||
sb: BaseUnix.Stat;
|
||||
Idx: PtrInt;
|
||||
iMyUID: Cardinal;
|
||||
hasSize: Boolean;
|
||||
ABitmap: TBitmap;
|
||||
sb: BaseUnix.Stat;
|
||||
Attrs: TFileAttrs;
|
||||
isFileSystem: Boolean;
|
||||
hasSize: Boolean;
|
||||
Polik: PtrInt;
|
||||
begin
|
||||
StopCalcFolderSize; // Stop previous calculate folder size operation
|
||||
isFileSystem := FFileSource.IsClass(TFileSystemFileSource);
|
||||
|
||||
Polik := PixMapManager.GetIconByFile(FFiles[iIndex], isFileSystem, True, sim_all_and_exe, True);
|
||||
if Polik < 0 then Polik:= PixMapManager.GetDefaultIcon(FFiles[iIndex]);
|
||||
imgFileIcon.Picture.Bitmap := PixMapManager.GetBitmap(Polik);
|
||||
Idx := PixMapManager.GetIconByFile(FFiles[iIndex], isFileSystem, True, sim_all_and_exe, True);
|
||||
if Idx < 0 then Idx:= PixMapManager.GetDefaultIcon(FFiles[iIndex]);
|
||||
ABitmap:= PixMapManager.GetBitmap(Idx);
|
||||
imgFileIcon.Picture.Bitmap := ABitmap;
|
||||
ABitmap.Free;
|
||||
|
||||
with FFiles[iIndex] do
|
||||
begin
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue