I am currently creating a program in Qt, OpenCv, Mac os X. I have a main window, and then a separate window that is opened. I pass the new window several matrix clones in the constructor:
ImageWindow *imageWin = new ImageWindow(
cvCloneMat(getData->getMasterRawMat(1)),
cvCloneMat(getData->getMasterRawMat(2)),
cvCloneMat(getData->getMasterRawMat(3)),
cvCloneMat(getData->getMasterRawMat(4)) );
imageWin->show();
How do I deallocate ( where do I call cvReleaseMat ), when the new window is closed?