Embarcadero's TTaskbar has a memory leak. Since I dropped this control on my form, FastMM reports a leak every time I close the app.
I tried to mute FastMM with this code:
procedure TMainForm.FormCreate(Sender: TObject);
begin
fastmm4.RegisterExpectedMemoryLeak(Taskbar);
end;
but it won't work. How to register this leak?
A memory block has been leaked. The size is: 100
This block was allocated by thread 0xC64, and the stack trace (return addresses) at the time was: 406A52 409A7B 409CAC 4283A0
[System.SysUtils][System][System.SysUtils.FmtStr] 409CC6 40D775 7628A65F
[Unknown function at StretchDIBits] 7731594E
[Unknown function at RtlpNtMakeTemporaryKey] 7731594E
[Unknown function at RtlpNtMakeTemporaryKey] 773168F8
[Unknown function at RtlpNtMakeTemporaryKey] 773168DC
[Unknown function at RtlpNtMakeTemporaryKey]The block is currently used for an object of class: UnicodeString
The allocation number is: 2209A memory block has been leaked. The size is: 36
This block was allocated by thread 0xC64, and the stack trace (return addresses) at the time was: 406A52 407D43 40846A 42CD40
[System.SysUtils][System][System.SysUtils.Exception.CreateFmt] 5DEDD7
[System.Win.TaskbarCore][System.Win][System.Win.TaskbarCore.TTaskbarBase.UpdateTab] 610F00
[Vcl.Taskbar][Vcl][Vcl.Taskbar.CheckMDI] 5DF39F
[System.Win.TaskbarCore][System.Win][System.Win.TaskbarCore.TTaskbarBase.ApplyTabsChanges] 610DB8
[Vcl.Taskbar][Vcl][Vcl.Taskbar.TCustomTaskbar.Initialize] 5EB044
[Vcl.Forms][Vcl][Vcl.Forms.TApplication.Run] 62573A
[MinimalTemplate.dpr][MinimalTemplate][MinimalTemplate.MinimalTemplate][26]The block is currently used for an object of class: ETaskbarException
The allocation number is: 2207This application has leaked memory. The small block leaks are (excluding expected leaks registered by pointer):
21 - 36 bytes: ETaskbarException x 1
85 - 100 bytes: UnicodeString x 1
[Vcl.Forms][Vcl][Vcl.Forms.TCustomForm.SetVisible] 5F5010
TTaskbarBase.UpdateTab
. It's a shocker too! – David HeffernanTTaskbar
component on a form and callingTaskbar1.UpdateTab()
is sufficient for reproducing this – Günther the Beautiful