Adds a warning regarding memory leaks in some javascript runtimes that do not support setInterval dereferencing (allowing users to better/manually clean-up supabase instances, freeing memory and allowing for garbage collection)
What kind of change does this PR introduce?
Warning/bug fix
What is the current behavior?
Currently, in environments that are neither Node.js nor Deno, a memory leak occurs due to setInterval not being dereferenced. See https://github.com/supabase/gotrue-js/issues/856. The implementor is never warned that such a memory leak exists for their specific runtime (such as in React Native).
This implements a warning, at least, that fires only once, to notify implementors to better clean-up instances in their environments (such as manually calling stopAutoRefresh when ready to dispose of instances).
Adds a warning regarding memory leaks in some javascript runtimes that do not support
setInterval
dereferencing (allowing users to better/manually clean-up supabase instances, freeing memory and allowing for garbage collection)What kind of change does this PR introduce?
Warning/bug fix
What is the current behavior?
Currently, in environments that are neither
Node.js
norDeno
, a memory leak occurs due tosetInterval
not being dereferenced. See https://github.com/supabase/gotrue-js/issues/856. The implementor is never warned that such a memory leak exists for their specific runtime (such as in React Native).This implements a warning, at least, that fires only once, to notify implementors to better clean-up instances in their environments (such as manually calling
stopAutoRefresh
when ready to dispose of instances).What is the new behavior?
Noted above.
Additional context
https://github.com/supabase/gotrue-js/issues/856