-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
Cannot reduce graphics memory leak of my android app #26837
Comments
Please add the output of To investigate we would need a minimal runnable reproduction |
Output of flutter doctor
|
@zoechi Thank you for replying. It's in general with any canvas, here run this app : Steps :
I am trying to make the same app like that one. |
@zoechi It would help us if we have a work around or something to clear graphics memory, cuz we will be using our application in production. Right now it takes around 0.7-1GB which isn't good for our app. |
Have you also tried if you can still reproduce with |
Isn't latest stable is on Master? I haven't tried with dev channel EDIT: I am on beta |
Latest
|
All numbers are just Graphic Memory from android profiler in Android Studio Beta goes to 0.7GB - 1GB Master goes to 3.1GB Peak and 1.1GB constant. EDIT EDIT Memory won't get freed even after canvas clear or widget dispose. Unless the app is turned off. |
I am facing this same issue. Also if you put the app in the background, GC will run but Graphic Memory won't get freed. How can we solve this issue for the time being? |
There is a work around to clear graphics memory. To clear the graphics memory,
Both of these things will clear the graphics memory |
This started when CCPR was enabled in Skia: google/skia@a2b5b64 |
CCPR has been disabled. |
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 |
I am using ImageProvider in 2 parts of my code
1.getting bytes from a file in system
2. drawing image on canvas
And i guess this is the reason for the memory leak
I tried clearing the imageCache of the PaintingBinding but didnot solve my problem
The text was updated successfully, but these errors were encountered: