-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[camera] Fix memory leaks in example and activate leak testing #8287
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // Copyright 2013 The Flutter Authors. All rights reserved. | ||
| // Use of this source code is governed by a BSD-style license that can be | ||
| // found in the LICENSE file. | ||
|
|
||
| import 'dart:async'; | ||
|
|
||
| import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; | ||
|
|
||
| Future<void> testExecutable(FutureOr<void> Function() testMain) async { | ||
|
||
| LeakTesting.enable(); | ||
| LeakTracking.warnForUnsupportedPlatforms = false; | ||
| await testMain(); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // Copyright 2013 The Flutter Authors. All rights reserved. | ||
| // Use of this source code is governed by a BSD-style license that can be | ||
| // found in the LICENSE file. | ||
|
|
||
| import 'dart:async'; | ||
|
|
||
| import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'; | ||
|
|
||
| Future<void> testExecutable(FutureOr<void> Function() testMain) async { | ||
| LeakTesting.enable(); | ||
| LeakTracking.warnForUnsupportedPlatforms = false; | ||
| await testMain(); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use
anyrather than^3.0.9?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what is recommended in the documentation (https://github.com/dart-lang/leak_tracker/blob/main/doc%2Fleak_tracking%2FDETECT.md) because the version is defined by the Flutter SDK.