1 /* For details, see README */ 2 3 extern "C" { 4 5 void __attribute__((constructor)) my_constructor(void)6my_constructor(void) 7 { 8 /* nothing */ 9 } 10 11 void __attribute__((destructor)) my_destructor(void)12my_destructor(void) 13 { 14 /* nothing */ 15 } 16 17 } 18 19 class Foo { 20 public: Foo()21 Foo() : mValue(1) {} ~Foo()22 ~Foo() { mValue = 0; } 23 private: 24 int mValue; 25 }; 26 27 static Foo foo; 28