1
2extern void bar();
3
4
5
6class A {
7public:
8	A() { bar(); }
9	~A() { bar(); }
10};
11
12
13// Create global object which will have its destructor run when
14// this dylib is unloaded.  The destructor will call into libbar,
15// so libbar.dylib can't be unloaded before this dylib.
16A a;
17
18
19
20
21void foo()
22{
23}
24