示例#1
0
 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);
 }