Seems more symmetric =P

This commit is contained in:
Aaron Culliney 2015-10-04 14:14:04 -07:00
parent e161dce3c2
commit b3ad0ae4ac
2 changed files with 8 additions and 5 deletions

View File

@ -27,7 +27,7 @@ static google_breakpad::ExceptionHandler *eh = nullptr;
static bool dumpCallback(const google_breakpad::MinidumpDescriptor& descriptor, void* context, bool succeeded) {
// WARNING : should only do minimal work from within a crashing context ...
LOG("Dump path: %s\n", descriptor.path());
LOG("Dump path: %s", descriptor.path());
return succeeded;
}
@ -38,9 +38,13 @@ extern "C" {
eh = new google_breakpad::ExceptionHandler(descriptor, NULL, dumpCallback, NULL, true, -1);
}
__attribute__((destructor(255)))
static void shutdownBreakpadHandler(void) {
delete eh;
eh = nullptr;
if (eh) {
delete eh;
eh = nullptr;
LOG("Unregistering Breakpad...");
}
}
static bool processCrashWithBreakpad(const char *crash, const char *symbolsPath, const FILE *outputFile) {

View File

@ -116,6 +116,7 @@ int64_t glnode_onTouchEvent(interface_touch_event_t action, int pointer_count, i
}
#endif
__attribute__((destructor(255)))
static void *_destroy_glnodes(void) {
LOG("...");
@ -134,8 +135,6 @@ __attribute__((constructor(CTOR_PRIORITY_LATE)))
static void _init_glnode_manager(void) {
LOG("Initializing GLNode manager subsystem");
atexit(&_destroy_glnodes);
#if INTERFACE_TOUCH
interface_onTouchEvent = &glnode_onTouchEvent;
#endif