I'm in trouble with Qt5's
This is the situation: I have a class M that extends
QMainWindow, and in this class I use an heap-allocated array. I read that with
WA_DeleteOnClose when the window M is closed, and the destructor called, every member with M as parent is deleted.
My question is: what's about the array? I know that every stack-allocated member is deallocated when the destructor is called, and i know that, in normal conditions, I have to call delete on my array. But in these conditions? If I don't use delete is my array deallocated because of the
WA_DeleteOnClose attribute? Another question. Is the WA_DeleteOnClose attribute inherited by all M's childrens? In other words, do I have to set that attribute to true in all childrens? Many thanks to all.