Skip to content

Ownership in event loop closures. #2150

Answered by cwfitzgerald
prideout asked this question in Q&A
Discussion options

You must be logged in to vote

Interesting question!

So the reason those are on the capture list are because they are only use in initialization, inside the loop they are never used, so have no reason to be captured. We want them to be captured to make sure they are dropped, which is why we capture but immediately discard them.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by prideout
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