yes, because you have defined dialog using a pointer an new() operator. so the dialog exists in memory as long as its parent exists.
if you need to destruct dialog sooner, do this:

Qt Code:
  1. delete dialog;
To copy to clipboard, switch view to plain text mode 

by calling delete operator, ~MyDialog will be called, then dialog will be cleared from memory.