Is it leaky if I never cancel a coroutine scope, b...
# coroutines
u
Is it leaky if I never cancel a coroutine scope, but all it's jobs are finished?
e
1. if you have a reference to the scope, it won't be garbage collected 2. if you don't have a reference to the scope (or to something related, such as a job) then I believe you are at risk of the jobs getting garbage collected before running to completion
u
its sortof a 3. its a broadcast receiver, system instantiates it, i'd create scope as a private val. then system calls onReceive, i run suspend funs in the private scope after 10s system kills the receiver instance, however there is no onDestroy callback for me to cancel the scope its only db queries so 10s will be more than enough and 99.99% the jobs will complete is that a leak after 10s?