-
Notifications
You must be signed in to change notification settings - Fork 325
[perf] Fix incorrect parentDisposable
s
#8107
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
Comments
parentDisposable
sparentDisposable
s
Remove a bit more legacy inspector detritus. Discovered when migrating parent disposables in pursuit of #8107. --- - [x] I’ve reviewed the contributor guide and applied the relevant portions to this PR. <details> <summary>Contribution guidelines:</summary><br> - See our [contributor guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview) for general expectations for PRs. - Larger or significant changes should be discussed in an issue before creating a PR. - Dart contributions to our repos should follow the [Dart style guide](https://dart.dev/guides/language/effective-dart) and use `dart format`. - Java and Kotlin contributions should strive to follow Java and Kotlin best practices ([discussion](#8098)). </details>
This service is unused. Discovered when migrating parent disposables in pursuit of #8107. --- - [x] I’ve reviewed the contributor guide and applied the relevant portions to this PR. <details> <summary>Contribution guidelines:</summary><br> - See our [contributor guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview) for general expectations for PRs. - Larger or significant changes should be discussed in an issue before creating a PR. - Dart contributions to our repos should follow the [Dart style guide](https://dart.dev/guides/language/effective-dart) and use `dart format`. - Java and Kotlin contributions should strive to follow Java and Kotlin best practices ([discussion](#8098)). </details>
#8178 gets us nearly there but I'm not sure what to do about flutter-intellij/flutter-studio/src/io/flutter/android/AndroidModuleLibraryManager.java Line 211 in 0c1007c
@alexander-doroshko: I wonder if you can advise? Are these |
Using a `Project` as a parent disposable can lead to plugins not being unloaded correctly leading to memory leaks. This follows the advice given in the Jetbrains [disposer docs](https://plugins.jetbrains.com/docs/intellij/disposers.html?from=IncorrectParentDisposable#choosing-a-disposable-parent) and is (I think) consistent with the Dart plugin (@alexander-doroshko?). This gets us *most* of the way to fixing #8107 with an open question about `AndroidModuleLibraryManager`. (Question posed there 👍 .) --- - [x] I’ve reviewed the contributor guide and applied the relevant portions to this PR. <details> <summary>Contribution guidelines:</summary><br> - See our [contributor guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview) for general expectations for PRs. - Larger or significant changes should be discussed in an issue before creating a PR. - Dart contributions to our repos should follow the [Dart style guide](https://dart.dev/guides/language/effective-dart) and use `dart format`. - Java and Kotlin contributions should strive to follow Java and Kotlin best practices ([discussion](#8098)). </details>
@pq Sorry for the delay. I can't answer this specific question right now. This question may disappear as soon as we start working on tech debt and the plugin refactoring. General answer is that manual So far, I don't fully understand the purpose of the |
I wondered about this and kind of gathered as much.
Right. There are lots of internal dependencies in this class and TODOs going that suggest it may not be working as expected. Some dating back to 2018! It looks like I was a reviewer on this so I'll try and jog my memory. For reference there's #2474 |
Using an
Application
orProject
as a parent disposable in plugin code can lead to plugins not being unloaded correctly and with that memory leaks.See: https://plugins.jetbrains.com/docs/intellij/disposers.html?from=IncorrectParentDisposable#choosing-a-disposable-parent
The text was updated successfully, but these errors were encountered: