I'm using Instruments (on Mac) to track memory leaks in a QT app I wrote. I've gotten rid of the ones due to my code and am left with those it is not clear are really leaks and are from QT.

1. QMessageBox - is it destroyed on close?
2. QDrag - is it destroyed when the drag is complete?

An example of the code that registers as a leak is:
Qt Code:
  1. void about() {
  2. QMessageBox::information(this, "About X", "X is a program.\n")
  3. }
To copy to clipboard, switch view to plain text mode 

and,

Qt Code:
  1. void PhotoMailer::mousePressEvent(QMouseEvent *event) {
  2. //http://doc.trolltech.com/4.2/dnd.html
  3. if (event->button() == Qt::LeftButton) {
  4. QDrag *drag = new QDrag((QWidget*)this);
  5. QMimeData *mimeData = new QMimeData;
  6. mimeData->setUrls(url);
  7. drag->setMimeData(mimeData);
  8. drag->start();
  9. }
  10. }
To copy to clipboard, switch view to plain text mode 

My question is, should I worry - they are created with new and then 'lost', i.e. the calling function returns without telling anyone of the pointer, so I understand that a profiler will flag this as a leak, but will QT take care of them? Or have I missed a programming paradigm here.

Thanks!
-K