App crash using VirtualScroll in iOS due to memory leak

In my case, my app load 1,000 records in ion-list using virtualScroll. When it runs in android, everything is fine. However, when it runs in iOS, it crash when I scroll down the list and then scroll up continuously.

From the Xcode output, I got message: ‘Message from debugger: Terminated due to memory issue’.
And I found the memory used is over 300mb finally. Before I scroll the screen, the memory only occupy around 100mb.

I do the test in real devices. For android I test in Android 4.4.4 (Android Galaxy note 4 and tab s). For iOS I test in iOS10.2.1 (iPad).

Cordova CLI: 6.5.0
Ionic Framework Version: 2.0.1
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.0.0
ios-deploy version: 1.9.1
ios-sim version: 5.0.13
OS: macOS Sierra
Node Version: v6.9.5
Xcode version: Xcode 8.2.1 Build version 8C1002

Anyone have any suggests to this? @mhartington @brandyshea


which ionic version do you use?

ionic 2.0.0

Does 2.0.1 fix this?

give it a try ;). it takes 5minutes

Sorry. It is ionic 2.0.1 actually. I just updated today.

@xiejiabao, did you ever find the solution? I have exactly the same problem, except I’m using the regular scroll and I have much less items on my list (20-50 items) .

I’m using the last version of Ionic - 3.6.0:

cli packages:

    @ionic/cli-plugin-cordova       : 1.5.0 
    @ionic/cli-plugin-ionic-angular : 1.4.0 
    @ionic/cli-utils                : 1.6.0 
    ionic (Ionic CLI)               : 3.6.0 

global packages:

    Cordova CLI : 7.0.1 

local packages:

    @ionic/app-scripts : 2.1.3
    Cordova Platforms  : android 6.2.3 ios 4.4.0
    Ionic Framework    : ionic-angular 3.6.0


    Node       : v8.1.3
    OS         : macOS Sierra
    Xcode      : Xcode 8.3.3 Build version 8E3004b 
    ios-deploy : 1.9.1 
    npm        : 5.3.0 

Sorry. No solution yet. If you get any idea, please refer to this topic as well. :slight_smile:

@bengtler There is many problem with IOS, for me some function not working.