Memory leakage with XE4 and GDI

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
ulibru
Newbie
Newbie
Posts: 11
Joined: Mon Dec 10, 2012 12:00 am

Memory leakage with XE4 and GDI

Post by ulibru » Mon Jun 17, 2013 10:31 am

Actually I move a previous project to XE4.
The program reports a memory leakage at shutdown:
An unexpected memory leakage has occurred. The unexpected small block leaks are:
85 - 92 bytes: TTeeGradient x 3
349 - 380 bytes: TTeeCanvas3D x 3
The sizes of unexpected leaked medium and large blocks are: 262700, 262700, 262700
I have 3 charts defined in the program. Now I have found when adding a new chart and rendering 3D with GDI the memory leakge increases from x3 to x4.
Changng all charts to GDI+ removes the memory leakage, no message then

But I prefer to use GDI. How to fix?

Regards
Uli

ulibru
Newbie
Newbie
Posts: 11
Joined: Mon Dec 10, 2012 12:00 am

Re: Memory leakage with XE4 and GDI

Post by ulibru » Mon Jun 17, 2013 4:24 pm

I know a bit more now but still not enough to correct it.

TCustomTeePanel.Create (TeeProcs) calls by CreateDefaultCanvas the procedure TGDIPlusCanvas.Create (TeeGDIPlus).
When the rendering is set to GDI+ then also TGDIPlusCanvas.Destroy is called when the program finishes.

But if instead only GDI is selected a render option then TGDIPlusCanvas.Destroy is never called, leaving the created canvas as memory leakage.

Uli

ulibru
Newbie
Newbie
Posts: 11
Joined: Mon Dec 10, 2012 12:00 am

Re: Memory leakage with XE4 and GDI

Post by ulibru » Wed Jun 19, 2013 4:03 pm

Hi,

so far Steema has not replied.
But the post of Vasek http://www.teechart.net/support/viewtop ... 180#p62180 also solves my problem.

Maybe Steema can confirm the solution?

Uli

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Memory leakage with XE4 and GDI

Post by Narcís » Fri Jun 21, 2013 7:10 am

Hi Uli,

Yes, that's right, I just replied to Vasek's suggestion.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply