I use Hilt for DI and recently (after some update) android studio warns me on context filed annotated with
@ApplicationContext for memory leaks. as far as I know I know application context will available while app is running and it shouldn’t cause memory leak but it seems lint think differently. am I wrong or it’s just a bug?
I solved this by using
ApplicationContext instead of
class ActivityViewModel @ViewModelInject constructor( @ApplicationContext val context: ApplicationContext, )