-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
Steps to Reproduce
I write a demo for display 51 image widget in ListView Widget, the image resource are from CDN server, after all the images are showing, the application use 360+M memory, see the picture down there

all the images's size are only 200+ KB far less than 1MB, the image resource urls is in the file ImagesSource.dart.txt
ImagesSource.dart.txt
and my flutter project code in main.dart.txt
main.dart.txt
Also I write a compare demo by iOS native display the same image resources , iOS native just use 70M memory, why the flutter use much bigger memory than iOS native?
and, there also anther problem, in my flutter demo, when click the image widget, the home page will rebuild by calling the setState() function, and the page State build() return a Text Widget instead the ListView widget before, I think the memory will diminish, but the memory keep the same, I try force gc but no effect, how the dart gc work?
Logs
Flutter Doctor
/Users/chaokong/flutterSDK/bin/flutter --no-color doctor
[✓] Flutter (on Mac OS X 10.12.6 16G1036, locale zh-Hans-CN, channel master)
• Flutter at /Users/chaokong/flutterSDK
• Framework revision bdbe53be01 (4 days ago), 2017-11-24 19:13:18 -0800
• Engine revision 93b2179597
• Tools Dart version 1.25.0-dev.11.0
[✓] Android toolchain - develop for Android devices (Android SDK 26.0.2)
• Android SDK at /Users/chaokong/Library/Android/sdk
• Unable to locate Android NDK.
• Unable to locate compiler in Android NDK.
• Platform android-26, build-tools 26.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.1, Build version 9B55
• ios-deploy 1.9.2
• CocoaPods version 1.1.1
[✓] Android Studio (version 3.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
[✓] IntelliJ IDEA Community Edition (version 2017.2.6)
• Flutter plugin version 19.1
• Dart plugin version 172.4343.25
[✓] Connected devices
• 张伟平的 iPhone • fb87fda18a77f01197d25047bed12a782b21e01f • ios • iOS 11.1
• iPhone X • C598742A-2903-4BE8-A6FF-4168FC8DD581 • ios • iOS 11.1 (simulator)
Process finished with exit code 0

