fork download
  1. class Foo
  2. {
  3. Foo() {};
  4. ~Foo() { Something really important happens here };
  5. int somemember;
  6. }
  7.  
  8. class Bar : public QDialog
  9. {
  10. //Some part of the Ui
  11. Foo myFoo;
  12. }
  13.  
  14. int main()
  15. {
  16.  
  17. Bar b;
  18. } // Bar autodestructs here, calling the Foo's destructor on b.myFoo automagically
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty