I have a controller that contains an array containing objects. Whenever I want to reload this array, I use controller.set('messages', []); .
In my browser, this works fine and does not cause the browser to crash. However, on the iPad, the application crashes after a few minutes. In my debug log, I see a memory warning. I assume that the objects remain in memory, which over time causes the application to crash. (I read somewhere that Safari on iPad has a 10 MB memory limit for javascript object, etc.)
Is this the right way to clear data from an array and remove all references to this object, so that it could be garbage collection by the system?
source share