@elizarov ohh, I forgot to add link to the project repo, I should sleep more 😅
https://github.com/gildor/kotlin-coroutines-android
7 replies
@kenkyee Yeah, it’s not a way to avoid all memory leaks by magic, it’s just a way to create coroutine that implicitly subscribed on life-cycle events to cancel your coroutine onPause/onStop/onDestroy, same idea that used in RxLifecycle but also you shouldn’t register coroutine explicitly to lifecycle events, because in my implementation you create coroutine using lifecycle extension function