1 // { dg-do run } 2 // From: bruno@isoft.com.ar (Bruno R. Depascale) 3 // Subject: No destructor bug 4 // Date: Mon, 14 Feb 1994 12:49:45 -0300 (Arg) 5 6 // Bug: temporaries created with constructor notation aren't destroyed. 7 8 int count = 0; 9 10 class A { 11 public: A()12 A() { ++count; } ~A()13 ~A() { --count; } 14 }; 15 main()16int main() 17 { 18 A(); 19 return count; 20 } 21