Prevent ChildView
from retaining an otherwise dropped view
This commit is contained in:
parent
26b03afa60
commit
06dfb74663
2 changed files with 17 additions and 7 deletions
|
@ -4732,6 +4732,10 @@ pub struct AnyWeakViewHandle {
|
|||
}
|
||||
|
||||
impl AnyWeakViewHandle {
|
||||
pub fn id(&self) -> usize {
|
||||
self.view_id
|
||||
}
|
||||
|
||||
pub fn upgrade(&self, cx: &impl UpgradeViewHandle) -> Option<AnyViewHandle> {
|
||||
cx.upgrade_any_view_handle(self)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue