Skip to content

iOS - Memory issues #115562

@jjboy91

Description

@jjboy91

Hello,

I'm currently working on optimizing my app.
When I'm monitoring the app's memory in DevTool it's showing around 20MB of memory usage.

However, when I'm running the same app via XCode, it's showing 250MB of memory usage or more and around the same value via Instruments or on an iOS app that shows the memory consumption on the device.

Capture d’écran 2022-11-17 à 16 10 36
Capture d’écran 2022-11-17 à 16 33 08
Capture d’écran 2022-11-17 à 16 36 18

What could explain DevTool not showing the right values ?

Also I notice that during a pushAndReplace call, the dispose method was called but the used memory wasn't released.

Where should I look or what should I add to that method so that the page's widget are properly released ?

Thanks

flutter doctor -v

[✓] Flutter (Channel master, 3.5.0-12.0.pre.175, on macOS 12.6 21G115 darwin-x64, locale fr-FR)
• Flutter version 3.5.0-12.0.pre.175 on channel master at /Users/idm/Documents/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 92f10ed (9 days ago), 2022-11-08 17:57:52 -0800
• Engine revision e7d7edab98
• Dart version 2.19.0 (build 2.19.0-374.0.dev)
• DevTools version 2.19.0

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
• Android SDK at /Users/idm/Library/Android/sdk
• Platform android-30, build-tools 30.0.1
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14A400
• CocoaPods version 1.11.3

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] VS Code (version 1.73.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.52.0

[✓] Connected device (3 available)
• iPad (2) (mobile) • 0d90cccda2e8ecbf09cb57bbe0219aaf441b212d • ios • iOS 15.6 19G71
• macOS (desktop) • macos • darwin-x64 • macOS 12.6 21G115 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 107.0.5304.110

[✓] HTTP Host Availability
• All required HTTP hosts are available

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    in triagePresently being triaged by the triage teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions