private void DisposeItems()
 {
     _content?.Dispose();
     _content = null;
     _close?.Dispose();
     _close = null;
     _resultsView?.Dispose();
     _resultsView = null;
     _resultsTxv?.Dispose();
     _resultsTxv = null;
     _orderId?.Dispose();
     _orderId = null;
     _checkBtn?.Dispose();
     _checkBtn      = null;
     _presenter     = null;
     _servicePoints = null;
     _spRecyclerView?.Dispose();
     _spRecyclerView = null;
     _mapFragment?.Dispose();
     _mapFragment = null;
     _viewIcon?.SetImageDrawable(null);
     _viewIcon.Dispose();
     _animationView?.Dispose();
     _receiver?.Dispose();
     _receiver = null;
     _connection?.Dispose();
     _connection = null;
 }
Beispiel #2
0
        public override void OnDestroyView()
        {
            base.OnDestroyView();

            // Clean markers
            foreach (Marker marker in transportMarkers.Values)
            {
                Activity.RunOnUiThread(marker.Remove);
            }

            transportMarkers.Clear();
            markerSteps.Clear();

            // Stop and clean animators
            foreach (ValueAnimator valueAnimator in markerAnimators.Values)
            {
                Activity.RunOnUiThread(valueAnimator.Pause);
            }

            markerAnimators.Clear();

            // Dispose map
            googleMap.Clear();
            googleMap.Dispose();
            mapFragment.Dispose();
            mapFragment = null;
        }