-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Description
Steps to reproduce
The documentation for this method states:
The buffer will be disposed by this method once the codec has been created, so the caller must relinquish ownership of the buffer when they call this method.
While this is true on non-web platforms as shown below:
dart:ui
On web, you can see that only the codec is disposed but not the buffer, and the buffer isn't cleared in any of the called functions since it passes the underlying .list
and not the buffer itself:
web:ui
This is different from my previously filed issue since that describes a leaking image, not a leaking buffer.
Expected results
All platforms should dispose the provided buffer.
Actual results
The web platform doesn't dispose the buffer, so to prevent a double disposal, one must special case the disposal for web so it is properly cleaned up on web/non-web platforms.
Code sample
Code sample
[Paste your code here]
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]
Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.22.1, on Microsoft Windows [Version 10.0.19044.4291], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.3.5)
[!] Android Studio (version 2021.3)
X Unable to determine bundled Java version.
[√] Android Studio (version 2023.3)
[√] VS Code (version 1.89.1)
[√] Connected device (3 available)
[√] Network resources