Ist GWuerfel eine Klasse bei dir?webmaster1987 hat geschrieben:...
..Code: Alles auswählen
GWuerfel::~GWuerfel() { delete this; } ... void Formular::closeEvent(QCloseEvent *event) { for(int i=0;i<WuerfelCount;i++) Wuerfel[i]->~GWuerfel(); event->accept(); }
Eigendlich meine ich
Code: Alles auswählen
MyClass::MyClass()
{
...
GWuerfel** Wuerfel;
Wuerfel = new GWuerfel*[count];
...
}
MyClass::~MyClass()
{
...
delete [] Wuerfel;
...
}