Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Version used: 1.3.0-alpha04
Devices/Android versions reproduced on: any version
Since all the extension functions for Fragment result API are not "inline", calling setFragmentResultListener requires a double listener allocation: one for the Function2 passed to the extension function, and one for the actual FragmentResultListener that wraps Function2.
This applies for both Fragment.kt and FragmentResultOwner.kt files.
The fix is straightforward: mark the functions as "inline" and the listeners as "crossinline".
Now only the FragmentResultListener will be allocated.