Commit c59acde
Avoid memory leak of activity in ExitTransitionCoordinator
During the use of makeSceneTransitionAnimation(), two
ExitTransitionCoordinator instances are generated, corresponding to the
activity before the transition and the activity after the transition,
respectively. The activity after the transition is released after
finishing() when finishAfterTransition() is called. However, the
activity before the transition is leaked in ExitTransitionCoordinator
because mExitCallbacks holds it and cannot be released.. We found that
the reason why the activity before the transition cannot reach finish()
is that mIsReturning is always false.Therefore, we modified
finishIfNecessary() to release the activity to avoid the leak.
Change-Id: I795f4c85ebb85a5fb8448738e127f7b07cf8ef351 parent 216a28c commit c59acde
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
469 | | - | |
470 | | - | |
471 | | - | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
472 | 476 | | |
473 | 477 | | |
474 | 478 | | |
| |||
0 commit comments