title: How do I remove this listener in OnDestroy (Android Firebase)?
body: <p>This is my ValueEventListener in OnCreate method. I want to destroy this is OnDestroy method because it might be causing memory leak and also I've read it that it's a good practice to do so. </p>
  
  <pre><code>mDatabase.child(mPost_key).addValueEventListener(new ValueEventListener() {
          @Override
          public void onDataChange(DataSnapshot dataSnapshot) {
              display_author = (String) dataSnapshot.child("author").getValue();
              display_quote = (String) dataSnapshot.child("quote").getValue();
              display_pic_url = (String) dataSnapshot.child("pic_url").getValue();
              categoryData=(String) dataSnapshot.child("catg").getValue();
              display_prof=(String) dataSnapshot.child("prof").getValue();
              copyQuote = (display_quote + " - " +display_author);
              try {
                  author.setText(display_author);
                  quote.setText(display_quote);
                  category.setText(categoryData);
                  profession.setText(display_prof);
                  Glide.with(SingleExploreQuotes.this).load(display_pic_url).override(192, 192).into(profile_img);
  
              } catch (Exception e) {
                  finish();
              }
          }
  
          @Override
          public void onCancelled(DatabaseError databaseError) {
          }
      });
  </code></pre>