-
Notifications
You must be signed in to change notification settings - Fork 27.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory keeps increasing leads to crashing in iOS(It would easily happen in iPhone 6) #19754
Comments
Please add the output of |
|
Reproducing Steps: Push a page with complicated UI and pop, and do it repeatedly , or push diffrent pages repeatedly. |
I have the same problem, it seems FlutterViewController never be called dealloc to release. Every push will increase about 60+M memory. |
FlutterViewController can not be dealloc is a big big big big big bug , in v1.0 flutter |
Sounds more like a general performance issue on iPhone 6. |
Same here, flutter is reducing our possibilities with this. 😟 |
Call flutterEngine?.destroyContext() when you want release flutterViewController |
@cxq1221 - can you please provide a simple sample project that shows the problem? |
DestroyContext would crash |
@cxq1221 did you solve the issue. I have been having this issue for about a month now. no solution really frustrating. |
This is a big problem that our team has also encountered. We hope the authorities can solve it as soon as possible |
Hopefully they will. I have also opened another issue regarding this topic, no answer though. |
CC @gaaclarke who has commented on #44256 . Aaron: can you please try to see if this issue can be reproduced? |
There are a few issues that have addressed this. It sounds like some of the original comments are talking about a retain cycle with FlutterViewController, which isn't the case today. Some of the comments talk about releasing resources when FlutterViewController is deleted, that was addressed in: flutter/engine#13396 . It seems like some people may want to look into FlutterViewController.allowHeadlessExecution. One comment talks about the code in #32143 getting memory booted. I just ran that on master and it doesn't get memory booted. You can see when the image cache reaches a certain size it ejects things from memory. I suggest we put out a call for a reproduction case that results in a memory boot on master. That will help us definitively say if there is an issue still and what exactly it is since a few different things have been talked about. |
Hi @gaaclarke . Compared to the solution that set allowHeadlessExecution to NO. I prefer to set allowHeadlessExecution to YES. And call destroyContext by a timer when the FlutterViewController dealloc. This should allow some code at the end can be executed. |
Based on @gaaclarke's comments last year, it sounds like this bug is not really actionable any more, because it covers many topics. I recommend that for each individual thing you would like to see changed, you file a separate bug and describe the use case, the bug, how to reproduce the bug, and so forth. Thanks. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
When pushing and popping a complicated page repeatedly, the memory keeps increasing.
The same issue also exists in Flutter Gallery.
As described above:
The text was updated successfully, but these errors were encountered: