- This topic has 13 replies, 3 voices, and was last updated 5 years, 4 months ago by SzakiLaci.
-
AuthorPosts
-
July 2, 2019 at 3:49 pm #38309HeDiBoParticipant
In acAlphaImageList there's this code:
Code:procedure TsCharImageList.DoDraw(Index: Integer; Canvas: TCanvas; X, Y: Integer; Style: Cardinal; Enabled: Boolean);
var
Bmp, SrcImage: TBitmap;
begin
if HandleAllocated and IsValidIndex(Index, Items.Count) then begin
Bmp := CreateBmp32;//(Width, Height);
if Bmp <> nil then
try
Bmp.Canvas.Lock;
if Items[Index].Color = clNone then
ForeColor := Canvas.Font.Color;SrcImage := Items[Index].GetImage; //<<<< May produce a memory leak
Bmp.Height := SrcImage.Height;
Bmp.Width := SrcImage.Width;In acPopupController the initialization
Code:initialization
rShadowBmp := MakeShadow($44000000, 17, 2, 8, 0, 0);may create a TBrush which is not freed when rShadowBmp is freed
This is the memory leak report:
[attachment=9404:WIP4_MemoryManager_EventLog.txt]
July 4, 2019 at 5:01 am #59725SupportKeymasterThank you for the report, I will check it.
July 7, 2019 at 1:08 pm #59733SzakiLaciParticipant'HeDiBo' wrote:may create a TBrush which is not freed when rShadowBmp is freed
Do you think this can affect sPageControl component too?
Currently it has a huge memory leak too >> whenever hoovering the mouse over TABs, it creates a new BMP + Brush +++ never freed.
(3-600 of them pro minute, if someone is actively moving the mouse)
It completely ruined my APP, users calling me every day…
Reported the problem a week ago, no fix yet.
(WTF is happening to Serge lately ???)
July 7, 2019 at 2:06 pm #59735SupportKeymasterHello
Which tool do you use for checking of memory leaks?
I'm trying to repeat these leaks in tests, but can't. Maybe something should be changed. Can you help me to repeat it?
July 7, 2019 at 2:28 pm #59737HeDiBoParticipantFastMM4_FullDebugMode.dll
You must use FastMM4 as the first line in uses in dpr file:
Code:program SomeProgram;
uses
FastMM4,
MidasLib,
Vcl.Forms,I use these options:
[attachment=9410:FastMM4Options.zip]
My memory leak occurs when I change a skin programmatically.
July 7, 2019 at 2:51 pm #59738SupportKeymasterI'm sorry Dick, my message was addressed to SzakiLaci.
I can send you new files where your reported memory leak is removed (by PM).
July 7, 2019 at 4:05 pm #59739SzakiLaciParticipant'Support' wrote:I'm sorry Dick, my message was addressed to SzakiLaci.
I can send you new files where your reported memory leak is removed (by PM).
Thanks for the reply!
Yes, I'm using FastMM4 too.
It is strongly recommended for Delphi7.
But program's memory usage is increasing too, (measuring with Process Hacker), so it's definitely not a “false alarm” of FastMM4 debugger.
I'll create a DEMO.
July 7, 2019 at 4:23 pm #59741SupportKeymaster'SzakiLaci' wrote:I'll create a DEMO.Thanks
July 7, 2019 at 5:16 pm #59742SzakiLaciParticipant[attachment=9411:PageControl_MemLeak.zip]
move mouse up and down many times on the tabs, so they highlight for a moment.
July 7, 2019 at 6:27 pm #59743HeDiBoParticipant'Support' wrote:I'm sorry Dick, my message was addressed to SzakiLaci.
I can send you new files where your reported memory leak is removed (by PM).
That's not necessary, I'll await the next release.
July 8, 2019 at 4:54 am #59744SupportKeymasterSzakiLaci, I think, your memory leak is not linked with PageControl, reason is same as in a leak reported by HeDiBo (ImageList with disabled UseCache property).
I think, this memory leak is removed already, changes will be available in the nearest release.
July 10, 2019 at 7:58 am #59746SzakiLaciParticipant'Support' wrote:SzakiLaci, I think, your memory leak is not linked with PageControl, reason is same as in a leak reported by HeDiBo (ImageList with disabled UseCache property).
I think, this memory leak is removed already, changes will be available in the nearest release.
Upgraded to v14.28
Memory leak is STILL THERE! Also in the DEMO app I've uploaded for you.
To reproduce the problem you can simply:
1.) move the mouse up & down & up & down …. over the pagecontrol's TABs
or
2.) scroll the whole window up & down
July 10, 2019 at 8:30 am #59747SzakiLaciParticipant[attachment=9415:sPageCtrl_Memory_leak2.jpg]
The problem happens both with and without FastMM4 unit.
July 10, 2019 at 7:16 pm #59748SzakiLaciParticipantThis fixed 🙂
Code:2196: if not CanUseCache or not FUseCache then
2197: FreeAndNil(IcoBmp);You can close the topic.
-
AuthorPosts
- You must be logged in to reply to this topic.