Hi, I have a window in which i am constantly replacing a view with other view when the next button is clicked inside the window. I remove the old view before adding the new view, but in the browser(chrome) the memory does not seem to release. I have around 30 views that i replace in the window, with each view containing around 10 components. The memory footprint of the chrome renderer for my process goes upto 1GB before crashing.
Ah, great question! Mobile Web has an undocumented function that is on all Views (TableViews, ScrollViews, etc) called "destroy". When you remove a view and you no longer need it, simply do this:
myview.destroy && myview.destroy();This will destroy the view, it's children, all event listeners, everything.
Think you can help? Login to answer this question!