ionic-framework: Ionic 3, iOS 10, enormous Memory usage that is never released

Ionic version: (check one with “x”) [ ] 1.x [ ] 2.x [ X] 3.x

I’m submitting a … (check one with “x”) [X ] bug report

Current behavior:

Basic v3 App. Uses Tabs. One tab is empty, the other instantiates the Media and File plugins. Switching between tabs causes increasing memory usage that is never released. This practically makes ionic un-usable for deploying a real world application.

We have tried with @IonicPage decorators / modules / lazy loading and also without and eagerly loading the pages instead… same result for both although eagerly loading seems worse.

Expected behavior:

When exiting the Tab (or modal, we have tried both) the audio instance is released, this should clear up memory but it does not.

It could also be that the memory issue is unrelated to the Media and/or File plugins … we have no way of knowing without hiring a native developer really … the whole reason we are attempting to use Ionic is to avoid having to hire a Native Developer in the first place though right?

Steps to reproduce:

See this link in the forum, albeit, please excuse the frustration we expressed in the thread: https://forum.ionicframework.com/t/cordova-ionic-2-3-sadly-unusable-on-ios-please-tell-me-i-am-wrong/88339/8

Related code:

See this repo: https://github.com/gitdisrupt/Ionic3iOSMemoryIssue

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

Cordova CLI: 6.5.0 
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
ios-deploy version: 1.9.1 
ios-sim version: 5.0.13 
OS: macOS Sierra
Node Version: v7.9.0
Xcode version: Xcode 8.3 Build version 8W120l

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 15 (6 by maintainers)

Most upvoted comments

I had this problem also, But only when selection photos or taking photos (media and camera plugins) Each photo that was loaded to the app causes an increase in memory usage. Eventual I solved it by manually deleting the cache folder that the app loads the media to.

@gitdisrupt there was a patch for memory leak in the scroll function that just went into ionic 3.1 I think? Maybe update to 3.1.1 a d see if it is still reproducible?