Chills
02/13/2020, 4:15 PMunresolved reference
diesieben07
02/13/2020, 4:17 PMlaunch
"by itself" then you have a resource leak: You now have a coroutine running but nobody will take care to shut it down.
You always need a CoroutineScope
to ensure that resources are properly cleaned up.
Some resources:
https://kotlinlang.org/docs/reference/coroutines/basics.html#structured-concurrency
https://medium.com/@elizarov/structured-concurrency-722d765aa952
https://medium.com/@elizarov/structured-concurrency-anniversary-f2cc748b2401diesieben07
02/13/2020, 4:19 PMGlobalScope.launch
.