TImageList.GetIcon() memory leak
Original Reporter info from Mantis: Dibo
-
Reporter name: Krzysztof Dibowski
Original Reporter info from Mantis: Dibo
- Reporter name: Krzysztof Dibowski
Description:
Hi,
I'm changing form icon:
procedure TForm1.Button1Click(Sender: TObject);
begin
ImageList1.GetIcon(0, Self.Icon);
end;
Heaptrc output on app close:
Heap dump by heaptrc unit
2189 memory blocks allocated : 1666475/1669768
2187 memory blocks freed : 1665419/1668712
2 unfreed memory blocks : 1056
True heap size : 884736
True free heap : 883360
Should be : 883424
Call trace for block $00007FFFF7E09040 size 32
$00000000005DC400 line 495 of qt/qtlclintf.inc
$0000000000562E9D line 152 of include/lclintf.inc
$000000000053DED0 line 2334 of graphics.pp
$000000000065A200 line 714 of include/imglist.inc
$000000000065A388 line 733 of include/imglist.inc
$0000000000467450 line 35 of unit1.pas
$0000000000603D76 line 2722 of include/control.inc
$0000000000642B76 line 55 of include/buttoncontrol.inc
Call trace for block $00007FFFF7FA5E10 size 1024
$0000000000562E9D line 152 of include/lclintf.inc
$000000000053DED0 line 2334 of graphics.pp
$000000000065A200 line 714 of include/imglist.inc
$000000000065A388 line 733 of include/imglist.inc
$0000000000467450 line 35 of unit1.pas
$0000000000603D76 line 2722 of include/control.inc
$0000000000642B76 line 55 of include/buttoncontrol.inc
$0000000000643419 line 169 of include/buttons.inc
Steps to reproduce:
- Run attached
- Klik Button1
- Close app
- In app dir is memory.txt heaptrc dump
Additional information:
Lazarus 1.7 from SVN, Qt widgetset
FPC 2.6.4
Kubuntu 14.04 64bit
Mantis conversion info:
- Mantis ID: 29901
- OS: Kubuntu
- OS Build: 14.04 64bit
- Build: 52057
- Platform: Linux
- Version: 1.7 (SVN)
- Fixed in revision: r61624 (#b9157008)