android / architecture-components-samples

Samples for Android Architecture Components.
https://d.android.com/arch
Apache License 2.0
23.4k stars 8.29k forks source link

关于RoomDatabase单例模式Context被回收问题 #976

Open 285298984 opened 3 years ago

285298984 commented 3 years ago

关于RoomDatabase单例问题 Context被回收会对RoomDatabase有影响吗?

shawnthye-razer commented 3 years ago

关于RoomDatabase单例问题 Context被回收会对RoomDatabase有影响吗?

Translate -> Simple question about Room, Will Context recycling affect Room?

285298984 commented 3 years ago

Use context in RoomDatabase singleton pattern. After context is recycled, singleton pattern will be affected?

seung-yong-kim commented 2 years ago

It depends on your process flow. See how to handling work that shouldn’t be cancelled.