Create a new HD Firemonkey Application in Delphi XE2.
Drop a TMenuBar on the form. Edit at design time and add a ‘Foo’ menuitem, add a child item ‘Bar’.
Turn memory leak reporting on in .dpr
ReportMemoryLeaksOnShutdown := true;
Run app. Click ‘Bar’ as many times as you can be bothered to…
Is it just me or do memory leaks abound?
TList x2
Unknown x1
Position x4
TBounds x3, Unknown x1
TPopup x1
(per click)
Should I be concerned by this?
All of those are owned by the Popup in TMenuItem.Popup() in FMX.Menus.
If you free the Popup object at the end, all of the leaks go away.
It’s a blatant bug, but easily fixed.
I modified the source file and and placed it in my project’s folder until they release the bug fix.