koin-core / org.koin.dsl / onClose

onClose

infix fun <T> BeanDefinition<T>.onClose(onClose: OnCloseCallback<T>): BeanDefinition<T>

Callback when closing instance from registry (called just before final close)