android_mt6572_jiabo/ndk/tests/standalone/init-fini-arrays/foo.cpp
2025-09-05 16:56:03 +08:00

27 lines
319 B
C++

/* 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;