Chart type doesn't clean up memory

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
jonsberndt
Newbie
Newbie
Posts: 21
Joined: Wed May 02, 2007 12:00 am
Location: Houston, TX

Chart type doesn't clean up memory

Post by jonsberndt » Fri Feb 22, 2008 7:22 pm

When adding shapes (polygons) to the Map series (like in the example), when the form that contains the map is closed down, the memory is not released.

Is there a proper way make sure that when a form is closed that memory associated with the Map and its shapes are cleared? Right now, I am doing this:

map1.Shapes.Clear();

That doesn't seem to clear up the memory.

Jon

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

Post by Narcís » Mon Feb 25, 2008 8:45 am

Jon,

Please notice that the .NET Framework manages memory automatically. It could exist a memory leak in TeeChart for .NET but I'm not able to reproduce this issue here. Would you be so kind to let us know the example you are referring to or sending us a simple example project we can run "as-is" to reproduce the problem here and also the exact TeeChart version you are using?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
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

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Re: Chart type doesn't clean up memory

Post by Christopher » Wed Feb 27, 2008 12:30 pm

Jon wrote:When adding shapes (polygons) to the Map series (like in the example), when the form that contains the map is closed down, the memory is not released.

Is there a proper way make sure that when a form is closed that memory associated with the Map and its shapes are cleared? Right now, I am doing this:

map1.Shapes.Clear();

That doesn't seem to clear up the memory.
I took part in an interesting discussion about cleaning up memory in a microsoft newsgroup recently:
http://groups.google.com/group/microsof ... fd65?hl=en

Anyhow, I've made sure that the Dispose() method on the Polygon instances within the PolygonList is called when the PolygonList.Clear() method is called and that this Clear() method is called in the Map Series Dispose() method.

I think that's the best I can do :wink:
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply