`FramelessDialog` actually sets the `Qt::WA_DeleteOnClose` attribute which causes it to automatically delete itself on close (http://qt-project.org/doc/qt-4.8/qt.html#WidgetAttribute-enum).