Skip to content

Encounter Self-referential type when using winit(>= 0.30) Window and wgpu's Surface #6005

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

You must be logged in to vote
  1. You can put the window in an Arc, then hand the surface a clone of the Arc. The lifetime will be static.
  2. Because of the Arc, everything should work fine

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ifsheldon
Comment options

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