Skip to content

d/steamvr_lh: Make sure the context is release on exit

yshui requested to merge yshui/monado:lh-context-leak into main

because svrs->ctx holds a ref to Context, it was never freed. Sometimes this crashes monado on exit, because the lighthouse driver created a thread that is still running.

also I don't see svrs->ctx being used outside steamvr_lh_create_devices, maybe we can drop it altogether. this way Context will be freed after the HmdDevice created from it is dropped. never mind, i guess it's used to keep Context alive before setup_hmd? in that case I think we can change it to a unique_ptr and move it into the device in setup_hmd?

Edited by yshui

Merge request reports