Hi all, I'm writing a program that uses QAudioOutput::start(), which returns a QIODevice pointer. Does this device need to be manually deleted later? The class reference page doesn't seem to indicate either way.
Hi all, I'm writing a program that uses QAudioOutput::start(), which returns a QIODevice pointer. Does this device need to be manually deleted later? The class reference page doesn't seem to indicate either way.
I found the answer.
...gives the following:Qt Code:
QAudioOutput *audioOutput = new QAudioOutput(myAudioFormat, this); qDebug() << "Parent is" << ioDevice->parent();To copy to clipboard, switch view to plain text mode
So nobody owns the QIODevice, so it has to be manually deleted.Parent is QObject(0x0)
EDIT: Nope, I was mistaken... even though nobody owns the QIODevice, it still gets automatically deleted when QAudioOutput::stop() is called.
Last edited by hackerNovitiate; 20th January 2012 at 05:56. Reason: Wrong conclusion
Bookmarks