title: Why Observers added as observeForever to LiveData must be removed?
body: <p>I've read on <a href="https://developer.android.com/topic/libraries/architecture/livedata" rel="noreferrer">Android LiveData documentation</a> that:</p>
  
  <blockquote>
    <p>You can register an observer without an associated LifecycleOwner object using the observeForever(Observer) method. In this case, the observer is considered to be always active and is therefore always notified about modifications. You can remove these observers calling the removeObserver(Observer) method.</p>
  </blockquote>
  
  <p>I'm building an app using MVVM architecture pattern using <a href="https://developer.android.com/topic/libraries/architecture/viewmodel" rel="noreferrer">ViewModel</a> and declaring LiveDatas inside my ViewModel class. At my viewModel I have set a <code>observeForever</code> to a LiveData:</p>
  
  <pre><code>val password by lazy {
      MutableLiveData&lt;String&gt;()
  }
  
  init {
      initObservable()
  }
  
  private fun initObservable() {
      password.observeForever {
          ...
      }
  }
  </code></pre>
  
  <p>From what I understood from the documentation, I should remove the observer everytime the view that instantiates the ViewModel (with the previous code) was destroyed, right? But shouldn't the Observers be destroyed once the view is destroyed (since the ViewModel instance was instantiated in the view and will also be destroyed)?</p>