File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -302,8 +302,10 @@ migrate to the Builder.
302302### Handling Configuration Changes During Authentication
303303
304304v4 fixes a memory leak and lost callback issue when the Activity is destroyed during authentication
305- (e.g. device rotation, locale change, dark mode toggle). The SDK now uses ` WeakReference ` for
306- callbacks, so destroyed Activities are properly garbage collected.
305+ (e.g. device rotation, locale change, dark mode toggle). The SDK wraps the callback in a
306+ ` LifecycleAwareCallback ` that observes the host Activity/Fragment lifecycle. When ` onDestroy ` fires,
307+ the reference to the callback is immediately nulled out so the destroyed Activity is no longer held
308+ in memory.
307309
308310If the authentication result arrives while the Activity is being recreated, it is cached internally.
309311Use ` consumePendingLoginResult() ` or ` consumePendingLogoutResult() ` in your ` onResume() ` to recover it:
You can’t perform that action at this time.
0 commit comments