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