commit | 7b07d187ff08639ccc401a628fb98bc74d054755 | [log] [tgz] |
---|---|---|
author | hellohuanlin <41930132+hellohuanlin@users.noreply.github.com> | Fri Jan 19 18:22:25 2024 -0800 |
committer | GitHub <noreply@github.com> | Sat Jan 20 02:22:25 2024 +0000 |
tree | 30c43d7d13988decdd20ebd0e89d99b4dc2aac0e | |
parent | 44ee590f33ecb2e68e41da30d1acb1b59fa890bc [diff] |
[camera]fix a sample buffer memory leak on pause resume recording (#5927) This memory leak happens when pause/resume the recording. Depending on camera resolution, about 1-2MB leaks for every resume, so it can add up pretty fast if we frequently pause/resume. We only reference this sample buffer inside the scope of this method (e.g. directly piping into file IO), so no need to retain it again, as it's already retained and will be released afterwards by apple. (We did keep around the pixel buffer, but we already manually [retain](https://github.com/flutter/packages/blob/d7ee75ad59ad7bc45e659d0599e935e9e7981ea1/packages/camera/camera_avfoundation/ios/Classes/FLTCam.m#L403) and [release](https://github.com/flutter/packages/blob/d7ee75ad59ad7bc45e659d0599e935e9e7981ea1/packages/camera/camera_avfoundation/ios/Classes/FLTCam.m#L415) that) Bug was introduced in https://github.com/flutter/plugins/pull/1370. *List which issues are fixed by this PR. You must list at least one issue.* https://github.com/flutter/flutter/issues/132013 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
This repo is a companion repo to the main flutter repo. It contains the source code for Flutter's first-party packages (i.e., packages developed by the core Flutter team). Check the packages
directory to see all packages.
These packages are also available on pub.
Please file any issues, bugs, or feature requests in the main flutter repo. Issues pertaining to this repository are labeled “package”.
If you wish to contribute a new package to the Flutter ecosystem, please see the documentation for developing packages. You can store your package source code in any GitHub repository (the present repo is only intended for packages developed by the core Flutter team). Once your package is ready you can publish to the pub repository.
If you wish to contribute a change to any of the existing packages in this repo, please review our contribution guide, and send a pull request.
These are the packages hosted in this repository: