fix: clear the resolvedPage when entry is being cleared, change the passed View to be a weak reference (#7327)

* fix: clear the `resolvedPage` when entry is being cleared
fix: change the passed `View` to be a weak reference

* chore: add trace logs when weak ref has been cleared but is continuing to be used
chore: add condition to check if weak ref has not been cleared when it is being used

* chore: refactor the way the `resolvedPage` is cleared

* chore: add backward compatible property to avoid breaking changes

* chore: refactor condition to check if WeakRef is not cleared
chore: add tracelogs

* chore: refactor condition to check if WeakRef is not cleared
chore: add tracelogs

* refactor: weakRef usages

* chore: change the way WeakRef type check is done
This commit is contained in:
Vladimir Amiorkov
2019-06-21 11:48:49 +03:00
committed by Dimitar Topuzov
parent 81e1f54955
commit dfe76213dd
7 changed files with 239 additions and 51 deletions

View File

@@ -154,6 +154,8 @@ export class FrameBase extends CustomLayoutView implements FrameDefinition {
} else {
page._tearDownUI(true);
}
removed.resolvedPage = null;
}
// Attempts to implement https://github.com/NativeScript/NativeScript/issues/1311