Differences From Artifact [76085cee3c]:
- File src/OFFileURLHandler.m — part of check-in [c3ca6861ab] at 2020-12-21 19:43:09 on branch trunk — OFFileURLHandler: Fix brainfart (user: js, size: 36761) [annotate] [blame] [check-ins using]
To Artifact [9a74cc5a07]:
- File
src/OFFileURLHandler.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: 36849) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
106 107 108 109 110 111 112 | # define S_IFLNK 0x10000 # define S_ISLNK(mode) (mode & S_IFLNK) #endif #if defined(OF_FILE_MANAGER_SUPPORTS_OWNER) && defined(OF_HAVE_THREADS) static OFMutex *passwdMutex; | < > > < > > | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | # define S_IFLNK 0x10000 # define S_ISLNK(mode) (mode & S_IFLNK) #endif #if defined(OF_FILE_MANAGER_SUPPORTS_OWNER) && defined(OF_HAVE_THREADS) static OFMutex *passwdMutex; void releasePasswdMutex(void) { [passwdMutex release]; } #endif #if !defined(HAVE_READDIR_R) && defined(OF_HAVE_THREADS) && !defined(OF_WINDOWS) static OFMutex *readdirMutex; void releaseReaddirMutex(void) { [readdirMutex release]; } #endif #ifdef OF_WINDOWS static int (*func__wutime64)(const wchar_t *, struct __utimbuf64 *); |
︙ | ︙ | |||
541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 | #endif if (self != [OFFileURLHandler class]) return; #if defined(OF_FILE_MANAGER_SUPPORTS_OWNER) && defined(OF_HAVE_THREADS) passwdMutex = [[OFMutex alloc] init]; #endif #if !defined(HAVE_READDIR_R) && !defined(OF_WINDOWS) && defined(OF_HAVE_THREADS) readdirMutex = [[OFMutex alloc] init]; #endif #ifdef OF_WINDOWS if ((module = LoadLibrary("msvcrt.dll")) != NULL) func__wutime64 = (int (*)(const wchar_t *, struct __utimbuf64 *))GetProcAddress(module, "_wutime64"); | > > | 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 | #endif if (self != [OFFileURLHandler class]) return; #if defined(OF_FILE_MANAGER_SUPPORTS_OWNER) && defined(OF_HAVE_THREADS) passwdMutex = [[OFMutex alloc] init]; atexit(releasePasswdMutex); #endif #if !defined(HAVE_READDIR_R) && !defined(OF_WINDOWS) && defined(OF_HAVE_THREADS) readdirMutex = [[OFMutex alloc] init]; atexit(releaseReaddirMutex); #endif #ifdef OF_WINDOWS if ((module = LoadLibrary("msvcrt.dll")) != NULL) func__wutime64 = (int (*)(const wchar_t *, struct __utimbuf64 *))GetProcAddress(module, "_wutime64"); |
︙ | ︙ |