public override void OnDestroy() { if (player != null) { player.Release(); } base.OnDestroy(); }
protected override void OnDestroy() { try { YoutubePlayer?.Release(); base.OnDestroy(); } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
public override void OnDestroy() { try { YoutubePlayer?.Release(); base.OnDestroy(); } catch (Exception e) { Console.WriteLine(e); } }
protected override void Dispose(bool disposing) { try { if (disposing) { var tr = MainActivity.Current.SupportFragmentManager.BeginTransaction(); tr?.Remove(youTubePlayerFragment); tr?.Commit(); youTubePlayerFragment?.Dispose(); YPlayer?.Release(); YPlayer?.Dispose(); } } catch { } base.Dispose(disposing); }