bj0
08/15/2025, 6:35 AMMainScope()
into a class that creates a ktor HttpClient
to use for the lifetime of the scope, is there an idiomatic way to cleanup the client when the scope is cancelled? I can only think of launching a do-nothing coroutine that uses awaitCancellation
or using job.invokeOnCompletion
. I'm not sure if one of these are a good method or if there's something else?