class B private constructor() {
companion object {
fun getInstance() = Holder.sIntance
}
private object Holder {
val sIntance = B()
}
}
class A {
companion object {
val instance by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
A()
}
}
}