30 Mar 2012 6:54 AM #1
Unanswered: Destroy Touch Chart to release memory
How do we destroy a Touch Chart so that the memory is released.
I need to display a variety of charts on screen, each chart has to replace the previous chart. Currently I'm clearing the DOM of the chart markup but am unable to release the memory.
Any help is much appreciated.
30 Mar 2012 7:13 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
You should just destroy() or remove the chart from it's parent. If there is a memory leak then this would be considered a bug.Mitchell Simoens @LikelyMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services firstname.lastname@example.org
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
30 Mar 2012 8:04 AM #3
Thanks for the prompt reply.
I'm using the destroy() method to remove the chart object but I get the following error:
"Error: You are using a ServerProxy but have not supplied it with a url."
I'm not using any server proxy while clearing the screen though.
4 May 2012 10:43 AM #4
I am running into this issue as well. I call destroy on an existing chart and the memory is not being released.
Is there a method by which the configuration of the chart can be updated dynamically? I know there is the bind store method that will update the store used by the chart but I can't figure out how to reassign series and axes and such. I was hoping that reusing an existing chart would cut down on the fairly serious memory consumption but so far no luck.
25 Jan 2013 12:20 PM #5
Chart destroy() not working
What is the status of this?
We reported this issue about 9 months ago or more, and it was acknowledged as a bug with a memory leak in the Chart package. When destroy ) is called on a Chart object, it is not released, not garbage collected, and the memory is not reclaimed. So, destroying a Chart object and then creating a new one, causes a memory leak.
Has this been fixed yet? The last report we had recently is that it was not yet fixed. Is it being worked on?