fork download
  1. struct TestStruct
  2. {
  3. int a; // And other members here
  4. int *b = new int[10];
  5.  
  6. ~TestStruct()
  7. {
  8. delete[] b;
  9. }
  10. };
  11.  
  12. int main(void)
  13. {
  14. struct TestStruct *a_struct = new TestStruct();
  15.  
  16. delete a_struct;
  17.  
  18. return 0;
  19. }
Success #stdin #stdout 0s 4412KB
stdin
Standard input is empty
stdout
Standard output is empty