Interestin enough delete[] works also from copied pointers, it means that you don't need
int samplesSize;
as member data but a local variable will suffice and freeData() became:
Qt Code:
void Dialog::freeData() { for(int i = 0; i < samplesPtr.size(); i++) delete[] samplesPtr.at(i); }To copy to clipboard, switch view to plain text mode
Bookmarks