title: Android AlertDialog: window leaked error
body: <p>This error is showing for alert.show() line of code .In click interface of dialog, starting new activity like this
   startActivity(new Intent(LayoutActivity.this, MainActivity.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));</p>
  
  <p>Tried with closing of alert.dismiss() in onPause() and onStop() and onDestroy() still getting same error</p>