Current Path : /usr/src/tools/regression/pthread/unwind/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/src/tools/regression/pthread/unwind/Test.cpp |
/* $FreeBSD: release/9.1.0/tools/regression/pthread/unwind/Test.cpp 213155 2010-09-25 04:26:40Z davidxu $ */ int destructed; int destructed2; class Test { public: Test() { printf("Test::Test()\n"); } ~Test() { printf("Test::~Test()\n"); destructed = 1; } }; void cleanup_handler(void *arg) { destructed2 = 1; printf("%s()\n", __func__); } void check_destruct(void) { if (!destructed) printf("Bug, object destructor is not called\n"); else printf("OK\n"); } void check_destruct2(void) { if (!destructed) printf("Bug, object destructor is not called\n"); else if (!destructed2) printf("Bug, cleanup handler is not called\n"); else printf("OK\n"); }