Correctly Deleting Tableview Contents

I’m using the latest TableView widget and have multiple categories and rows. The rows each have an image (display.newImageRect) and text (display.newText) and it all works fine.

 

How would I properly delete everything in the TableView before deleting the TableView itself? I am assuming that “deleteAllRows()” will not properly delete the display items added to the row - or am I wrong?

Hi. May i ask why you want to remove the content before removing the tableView itself? Removing the tableview will also remove any content inserted into it (including any content inserted into its rows)

@Danny - So you’re saying that if I just do:

 

tableView:removeSelf();

tableView = nil;

 

This will remove all display objects that have been inserted into rows AND free the memory AND any references to those display objects?

 

David

Hi. May i ask why you want to remove the content before removing the tableView itself? Removing the tableview will also remove any content inserted into it (including any content inserted into its rows)

@Danny - So you’re saying that if I just do:

 

tableView:removeSelf();

tableView = nil;

 

This will remove all display objects that have been inserted into rows AND free the memory AND any references to those display objects?

 

David