-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[camera] Fix memory leaks in example and activate leak testing #8287
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 { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure how this is ran. Does this run automatically with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes this is run automatically with I don't mind adding a comment or something if you feel it is needed. Could you tell me what kind of comment you are expecting? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, ok. Sorry I was unfamiliar with this in |
||
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
any
rather 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.