I want to use FirebaseRecyclerAdapter in my project and I used this code segment in a previous Project
FirebaseRecyclerAdapter
In addition to @Lucy's answer. Now, there are architecture component lifecycle owners. As per the firestoreui android doc
If you don't want to manually start/stop listening you can use Android Architecture Components to automatically manage the lifecycle of the FirestoreRecyclerAdapter. Pass a LifecycleOwner to FirestoreRecyclerOptions.Builder.setLifecycleOwner(...) and FirebaseUI will automatically start and stop listening in onStart() and onStop().
In this specific situation,personsOptions.setLifecycleOwner(myFragmentOrActivity.this)