-
Notifications
You must be signed in to change notification settings - Fork 23
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
Implement flutter version of withLeakTracking
that calls MemoryAllocations.instance.addListener
#52
Comments
leak_tracker is a pure Dart library, while MemoryAllocations is a Flutter class. There should be separate method for Flutter to track Flutter leaks. While it is not implemented yet, you can create your own in your project. |
withLeakTracking
does not call MemoryAllocations.instance.addListener
withLeakTracking
that calls MemoryAllocations.instance.addListener
Discussion: flutter/devtools#3951 (comment) The plan is to create leak_tracker_flutter in the same mono-repo, but publishing it out of the flutter.dev publisher. @devoncarew , are you still ok with this option? If yes, I will prepare PR to create this package and also address #78. |
For these three options:
I think we want to avoid having dart.dev published packages depending on the flutter sdk.
This one would be ok (publishing from flutter.dev but hosting the code in a dart-lang mono-repo). We just want to make sure that we don't take a dependency on this package from the dart-lang/sdk repo - this is a possibility as the leak_tracker repo is dep'd into the sdk.
I don't see any real downsides to this from a hygiene POV. It would mean that the leak tracker related code was spread across a few repos, which may not be desired. |
To be able to catch flutter framework memory leaks we have to call
MemoryAllocations.instance.addListener
which does not happen inwithLeakTracking
.I understand if
withLeakTracking
should be framework independent but then we should update the documentation 👍🏽The text was updated successfully, but these errors were encountered: