Hi,
there is small but not welcomed memory leak in TeeProcs.TCustomTeePanel.CreateDefaultCanvas. When InternalCanvas is already set but has different ClassType, it is not freed but only replaced by another one. Such a way (in my case) one TTeeCanvas3D and one TTeeGradient is not freed for each instantiated Chart. I put InternalCanvas.Free before creation and assigning of the new Canvas, here is the patch:
Index: VCLTee.TeeProcs.pas
===================================================================
--- VCLTee.TeeProcs.pas (revision 315)
+++ VCLTee.TeeProcs.pas (working copy)
@@ -1813,6 +1813,7 @@
if (not Assigned(InternalCanvas)) or (tmpClass<>InternalCanvas.ClassType) then
begin
+ InternalCanvas.Free;
InternalCanvas:=tmpClass.Create;
InternalCanvas.ReferenceCanvas:=FDelphiCanvas;
end;
I'm using 2013 Pro +src version of VCLTee
Good luck
Vasek
Memory leak patch for TCustomTeePanel.CreateDefaultCanvas
Re: Memory leak patch for TCustomTeePanel.CreateDefaultCanvas
Thanks Vasek,
this also solves the problem I have reported in my post http://www.teechart.net/support/viewtop ... =3&t=14131
Uli
this also solves the problem I have reported in my post http://www.teechart.net/support/viewtop ... =3&t=14131
Uli
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Memory leak patch for TCustomTeePanel.CreateDefaultCanvas
Hello Vasek,
Thanks. Yes, you are right. We already had fixed that in our internal sources for the next release.
Thanks. Yes, you are right. We already had fixed that in our internal sources for the next 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 |