PlatformBehavior.OnAttachedTo() is called twice during adding behaviour to a control causing a memory leak #22740
Labels
area-core-lifecycle
XPlat and Native UIApplicationDelegate/Activity/Window lifecycle events
fixed-in-8.0.60
fixed-in-9.0.0-preview.5.24307.10
platform/android 🤖
platform/iOS 🍎
s/triaged
Issue has been reviewed
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Milestone
Description
PlatformBehavior.OnAttachedTo()
is called twice during adding behaviour to a control.As captured using a sample project, this method is called first time from:
and second time from:
This issue causes a memory leak when using a MCT
TouchBehaviour
Steps to Reproduce
OnAttachedTo()
OnAttachedTo()
is called twiceLink to public reproduction project repository
https://github.com/rafalka/BehaviourInitTwice/
Version with bug
8.0.40 SR5
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android, macOS, I was not able test on other platforms
Affected platform versions
iOS 17, Android 13, MAC 14.4.1
Did you find any workaround?
Workarounding this issue is not possible without changing platform behaviour implementation
Relevant log output
No response
The text was updated successfully, but these errors were encountered: