Where to quit the handler thread that used for realm operations in Android?
问题 I have an android application that I do many realm operations . I wanted to do those stuff on background and to do that I have used handler threads . I also used handler threads in some of my activities and service classes and I quit() those handler threads inside of onTerminate() or onDestroy() methods. However I do not know where should I quit the handler thread when I use it inside if a non-activity classes since they do not have onDestroy() methods. I have commented the handlerThread.quit