Unfortunately using .accessibilityElement(children: .contain) cause huge memory leak, more like memory flood, as Accessibility framework holds reference to view which in tern holds models and all the dependents. See: https://developer.apple.com/forums/thread/689078
Leak manifests not only in UITests but by any accessibility use, even accessing it via Accessibility Inspector or Voice Over.
See issue described here: https://developer.apple.com/forums/thread/689078
and sample project to reproduce the problem: https://github.com/yuri-qualtie/MemoryLeaks
Is there another way to add accessibility identifier to a SwiftUI container without causing leaks?
Post
Replies
Boosts
Views
Activity
Unfortunately using .accessibilityElement(children: .contain) cause huge memory leak, more like memory flood, as Accessibility framework holds view which in tern holds models and all the dependents. See: https://developer.apple.com/forums/thread/689078
Leak manifests not only in UITests but by any accessibility use, even accessing it via Accessibility Inspector or Voice Over.
See issue described here: https://developer.apple.com/forums/thread/689078
and sample project to reproduce the problem: https://github.com/yuri-qualtie/MemoryLeaks
Is there another way to add accessibility identifier to a SwiftUI container without causing leaks?
was working great until we noticed that our memory footprint grown from 45 Mb to 2.5 Gb and keeps growing if user is using accessibility features.