-
Notifications
You must be signed in to change notification settings - Fork 153
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
Does testing NavigationStack's destination view probably create memory leaks during testing? #337
Comments
Try to add |
Adding |
Just put a note here. After I use async inspection instead, it requires more resource to compile on my CI service (Bitrise M1 medium 4 CPU @ 3.2GHz, 6 GB RAM). With Bitrise Support's help, we've tested it needs Bitrise M1 Large 8 CPU @ 3.2GHz, 12 GB RAM) to compile successfully. Seems I can try another CI service. |
I glanced the source code of |
@ObservedObject
probably create memory leaks during testing?
@greenerchen since you've reopened the ticket - what do you think should be done here? I thought after you added view expelling the memory issue was gone |
@nalexn yes, the memory issue was gone on my laptop after I added view expelling. I wanna help update document about async inspection with NavigationDestination, so I reopened the ticket for the record. |
Hi,
I'm learning SwiftUI, Swift concurrency, and trying TDD using ViewInspector. I use the code snippet[1] to detect possible memory leaks in my unit tests, and I found that the
@ObservedObject
property couldn't be released after test teardown.@ObservedObject
property implies it's a MainActor instance, so my tests all annotate@MainActor
to suppress the warnings of actor-isolated messages. I'm curious if I did the test wrong and how I can fix it. Thanks!code snippets
@ObservedObject
The text was updated successfully, but these errors were encountered: