/// <summary>
 /// Releases all resource used by the <see cref="ION.Droid.Location.AndroidLocationManager"/> object.
 /// </summary>
 /// <remarks>Call <see cref="Dispose"/> when you are finished using the
 /// <see cref="ION.Droid.Location.AndroidLocationManager"/>. The <see cref="Dispose"/> method leaves the
 /// <see cref="ION.Droid.Location.AndroidLocationManager"/> in an unusable state. After calling
 /// <see cref="Dispose"/>, you must release all references to the
 /// <see cref="ION.Droid.Location.AndroidLocationManager"/> so the garbage collector can reclaim the memory that the
 /// <see cref="ION.Droid.Location.AndroidLocationManager"/> was occupying.</remarks>
 private void DoDispose()
 {
     try {
         StopAutomaticLocationPolling();
         ion.appPrefs.prefs.UnregisterOnSharedPreferenceChangeListener(this);
         if (altitudeProvider != null)
         {
             altitudeProvider.Dispose();
         }
         onLocationChanged = null;
     } catch (Exception e) {
         Log.E(this, "Failed to dispose", e);
     }
 }