You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am going to prefix this with a "I may be wasting your time".
I don't have a direct way to observe if this is a memory leak or not as my Meta Quest browser doesn't have debugging.
But in WebXRManager setSession the internal session is overwritten and the new one has all the events added to it.
But, if you were to call setSession again before endSession event triggers, either with a new session or a null, it becomes impossible to remove the event listeners.
I can understand this is by far not a priority, and any booboos this causes is all at the fault of the developer calling setSession twice..
I just happened to spot it as a potential problem and wanted to highlight it.
If it's deemed as not a problem then I will know not to highlight any other similar issues I may spot in the future when looking through the code.
But, if you were to call setSession again before endSession event triggers, either with a new session or a null, it becomes impossible to remove the event listeners.
Does this actually matter? If the session is overwritten with a new session or null, it should be GC collected. Besides, the event listener functions onSessionEvent(), onSessionEnd() and onInputSourcesChange() are only defined once and reused. So I doubt there are any side effects.
as my Meta Quest browser doesn't have debugging.
If you connect the Quest with USB to a computer, you can debug your WebXR application with Chrome and chrome://inspect/#devices. You must enable USB debugging on your Quest though which requires enabling development mode first.
Description
I am going to prefix this with a "I may be wasting your time".
I don't have a direct way to observe if this is a memory leak or not as my Meta Quest browser doesn't have debugging.
But in
WebXRManager setSession
the internal session is overwritten and the new one has all the events added to it.But, if you were to call
setSession
again beforeendSession
event triggers, either with a new session or anull
, it becomes impossible to remove the event listeners.I can understand this is by far not a priority, and any booboos this causes is all at the fault of the developer calling
setSession
twice..I just happened to spot it as a potential problem and wanted to highlight it.
If it's deemed as
not a problem
then I will know not to highlight any other similar issues I may spot in the future when looking through the code.Reproduction steps
Code
Live example
Screenshots
No response
Version
176
Device
Headset
Browser
Quest Browser
OS
Linux
The text was updated successfully, but these errors were encountered: