It's safe to set `dialog = null;` after dialog is closed, right? If so, it should be done to free memory sooner.