Differences From Artifact [6b459e66ba]:
- File src/OFDate.m — part of check-in [68214158ee] at 2020-12-21 00:36:46 on branch trunk — Add destructors for global mutexes (user: js, size: 20124) [annotate] [blame] [check-ins using]
To Artifact [3c5313a6f3]:
- File
src/OFDate.m
— part of check-in
[9cedc18bb3]
at
2020-12-21 21:29:51
on branch trunk
— Don't send messages in destructors
In our tests, we call objc_exit() using atexit(), so the runtime is
already gone by the time any destructors get called. (user: js, size: 20155) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
107 108 109 110 111 112 113 | return seconds; } #if (!defined(HAVE_GMTIME_R) || !defined(HAVE_LOCALTIME_R)) && \ defined(OF_HAVE_THREADS) static OFMutex *mutex; | < > > | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | return seconds; } #if (!defined(HAVE_GMTIME_R) || !defined(HAVE_LOCALTIME_R)) && \ defined(OF_HAVE_THREADS) static OFMutex *mutex; void releaseMutex(void) { [mutex release]; } #endif #ifdef OF_WINDOWS static __time64_t (*func__mktime64)(struct tm *); |
︙ | ︙ | |||
347 348 349 350 351 352 353 354 355 356 357 358 359 360 | return; placeholder.isa = [OFDatePlaceholder class]; #if (!defined(HAVE_GMTIME_R) || !defined(HAVE_LOCALTIME_R)) && \ defined(OF_HAVE_THREADS) mutex = [[OFMutex alloc] init]; #endif #ifdef OF_WINDOWS if ((module = LoadLibrary("msvcrt.dll")) != NULL) func__mktime64 = (__time64_t (*)(struct tm *)) GetProcAddress(module, "_mktime64"); #endif | > | 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 | return; placeholder.isa = [OFDatePlaceholder class]; #if (!defined(HAVE_GMTIME_R) || !defined(HAVE_LOCALTIME_R)) && \ defined(OF_HAVE_THREADS) mutex = [[OFMutex alloc] init]; atexit(releaseMutex); #endif #ifdef OF_WINDOWS if ((module = LoadLibrary("msvcrt.dll")) != NULL) func__mktime64 = (__time64_t (*)(struct tm *)) GetProcAddress(module, "_mktime64"); #endif |
︙ | ︙ |