Skip to content

app.as_weak().upgrade().unwrap() vs app.clone_strong() #7825

Answered by ultimaweapon
aurexav asked this question in Q&A
Discussion options

You must be logged in to vote

The latter will cause the window to contains a strong reference to itself, which prevent its reference count to reach zero. This will cause a resource to leak.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@aurexav
Comment options

@ultimaweapon
Comment options

Answer selected by aurexav
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants