My question is similar with this question here, which in the accepted answer the issue already solved in version 2.31.2. But the warning still exists for me and im using version 2.37. The other answers is still unclear for me (not actually confirmed what is happening). So this is my ViewModel code:
@HiltViewModel
class DetailViewModel @Inject constructor(
private val context: Context,
private val repository: VaccineRepository,
) : ViewModel() {
And this is the provides function:
@Singleton
@Provides
fun provideApplicationContext(
@ApplicationContext appContext: Context
): Context = appContext
It does works but the warrning is bothering me. So, is it just false warning and i can just suppress it or is it actually leaks?