I'm using Appcelerator 1.7.2 developing on the iPhone
I'm profiling my memory usage using Instruments and when I delete a row using a swipe gesture, the TiUITableViewRowProxy is not getting released.
Here's the code:
var tableview = Ti.UI.createTableView({ data : [Ti.UI.createTableViewRow({ title : 'A', hasChild : true }), Ti.UI.createTableViewRow({ title : 'B', hasChild : true })], editable : true, allowsSelectionDuringEditing : false });Should I be capturing the delete event and doing something in there?
2 Answers
Have you tried handling the swipe event of the TableViewRow, then setting the TableViewRow equal to null in the event? This should mark it for garbage collection.
Turns out the table view object doesn't manage the data for you. So deleting rows will never free memory. You have to manually manage an array of TableViewRow's, splicing and pushing, then use the tableview.setData(myManagedDataRows)
Your Answer
Think you can help? Login to answer this question!