Hello,
I just discovered a small memory leak in TeeChart v. 8.01 (June 26).
File TeePenDlg.pas,
procedure TPenDialog.FormShow(Sender: TObject);
The first 2 lines (line 221 and 222) should be
================
if not Assigned(BackupPen) then
BackupPen:=TChartPen.Create(nil);
================
The reason is that FormShow event can be called many times in the Chart Editor for the same TPenDialog form, causing repetitive construction of BackupPen.
Sincerely,
Michael
Memory leak in v.8.01
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Michael,
Thanks for your suggestion but BackupPen is already freed in TPenDialog.FormDestroy.
Thanks for your suggestion but BackupPen is already freed in TPenDialog.FormDestroy.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcis,
Yes, I know that it is freed in OnDestroy. The problem is that OnShow event can be called many times for the same form (example: TChartEdit dialog with multiple series), but OnDestroy will be called only ONCE!
You can convince yourself in the fact, that there is a memory leak here with FastMM in debug mode!
If necessary, I can prepare a soimple test case.
Regards,
Michael
Yes, I know that it is freed in OnDestroy. The problem is that OnShow event can be called many times for the same form (example: TChartEdit dialog with multiple series), but OnDestroy will be called only ONCE!
You can convince yourself in the fact, that there is a memory leak here with FastMM in debug mode!
If necessary, I can prepare a soimple test case.
Regards,
Michael
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Michael,
Thanks for the information. Yes, you are right. This seems to be a small VCL leak as it calls OnShow several times where it should only be done once.
Anyway we are going to try to fix it for the next maintenance release.
Thanks for the information. Yes, you are right. This seems to be a small VCL leak as it calls OnShow several times where it should only be done once.
Anyway we are going to try to fix it for the next maintenance release.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |