koan
26th April 2011, 11:02
QT handles memory deletion for child objects; I want to open a progress dialog and give a parent widget so I can set the Qt::Sheet window property.
If I open a progress dialog; i.e. QProgressDialog *mydialog = new QProgressDialog("Busy...", "Stop", start, stop, parent), then can I assume that QT will recycle/free memory if I mydialog->close() and then open a new one later ?
I'm concerned that if my function gets called many times I could do something nasty if QT doesn't take care of the memory. Is it the proper way, to just leave it for QT ?
If I open a progress dialog; i.e. QProgressDialog *mydialog = new QProgressDialog("Busy...", "Stop", start, stop, parent), then can I assume that QT will recycle/free memory if I mydialog->close() and then open a new one later ?
I'm concerned that if my function gets called many times I could do something nasty if QT doesn't take care of the memory. Is it the proper way, to just leave it for QT ?