Touch Charts will consistently crash iPad's Safari when Created and Destroyed
I need to initially show a set of up to 4 charts and then be able to switch the view to show another set of up to 4 charts and do this repeatably. When I do this with a fixed set of data, I can consistenly crash the iPad Safari browser at the same point. However this does not happen when running on Chrome or Safari Desktop (Windows or Mac) nor will it happen when using the iOS Simulator.
I have narrowed it down to the chart component by replacing it with a Panel and then re-running the test scripts. It has not yet crashed Safari. Further more, if I alter the number of points to chart, the iterations of showing a new set of charts before it crashes changes as well and is repeatable. The more items in the chart's store, the fewer iterations it takes before Safari crashes. The stores for the charts are loaded using the loadData() method with the append flag set to false.
Example test case-
- Show a Panel containing 3 charts with 80 points on Chart 1 and 500 points on Charts 2 and 3
- Show a Panel containing 2 charts with 80 points on Chart 1 and 500 points on Chart 2. (The Panel containing the 3 charts was removed from the viewport by doing a removeAll(true) on the containing Panel and then destroy() the Containing Panel before I add the new panel.)
- Show a Panel containing 4 charts with 80 points on Chart 1, 500 points on Charts 2 and 3 and 25 on Chart 4.
It will never show the 4 chart panel in step 3 - Safari quits at that point. If I lower the number of datapoints to chart, I can get more iterations of showing charts but eventually it will crash Safari on the iPad.
I suspect its a memory related issue and from what I have been reading, there is no garbage collection on iOS so these DOM elements that have been removed from the DOM tree are still hanging around and never be released. Is that true? If so then what does the destroy() actually do?
Any updates ont this thread
I downloaded Sencha charts yesterday and was building an application that does create and destroy charts, and have found that I consistently crash the iPad browser after four views. If the solution is not to create and destroy which crashes the iPad, what is the best method to work around this?