Skip to content
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

Make LeakCanary more strict #657

Open
rjrjr opened this issue Feb 2, 2022 · 1 comment · May be fixed by #658
Open

Make LeakCanary more strict #657

rjrjr opened this issue Feb 2, 2022 · 1 comment · May be fixed by #658
Assignees

Comments

@rjrjr
Copy link
Contributor

rjrjr commented Feb 2, 2022

Reported by @pyricau: At the moment we are only checking for leaks after the activity is destroyed, which means there is a huge window we're missing. We should check before that as well:

@get:Rule val rules = RuleChain.outerRule(DetectLeaksAfterTestSuccess()).around(scenarioRule).around(DetectLeaksAfterTestSuccess())!!
@pyricau
Copy link
Member

pyricau commented Feb 2, 2022

This makes we wonder if there's a clever API we can have that says "do this both inside and outside this chain of rules"

@RBusarow RBusarow self-assigned this Feb 2, 2022
RBusarow added a commit that referenced this issue Feb 3, 2022
…/wrapInLeakCanary

* origin/rick/wrapInLeakCanary:
  wrap Activity and Compose rules in LeakCanary checks on both sides fixes #657

# Conflicts:
#	workflow-ui/container-android/src/androidTest/java/com/squareup/workflow1/ui/backstack/test/BackstackContainerTest.kt
#	workflow-ui/core-android/src/androidTest/java/com/squareup/workflow1/ui/WorkflowViewStubLifecycleTest.kt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants