Skip to content

Span applicability to Drop impl #3244

Answered by mladedav
sukhmel asked this question in Q&A
Mar 28, 2025 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Right, if you can carry the span around, that's the way to go to make sure it's in that span.

Right, once you upgrade a Weak into an Arc, that Arc also contributes to the strong count. But if you then drop all the other Arcs and then drop this Arc, the object will be deallocated regardless of whether you still hold the Weak or not. It doesn't really matter whether the Arcs come from cloning or upgrading, once the last one is dropped, then the object is deallocated and you won't be able to upgrade any more Weaks.

Replies: 1 comment 2 replies

Comment options

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

@mladedav
Comment options

Answer selected by sukhmel
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