Make +atExit method honor the shoudl clean up setting

This commit is contained in:
rfm 2024-11-19 18:10:07 +00:00
parent 691d1eaafe
commit 7965acc27b
4 changed files with 55 additions and 43 deletions

View file

@ -304,17 +304,20 @@ static NSMutableDictionary *privateKeyCache1 = nil;
+ (void) atExit
{
DESTROY(certificateListLock);
DESTROY(certificateListCache);
DESTROY(credentialsLock);
DESTROY(credentialsCache);
DESTROY(fileLock);
DESTROY(fileMap);
DESTROY(paramsLock);
DESTROY(paramsCache);
DESTROY(privateKeyLock);
DESTROY(privateKeyCache0);
DESTROY(privateKeyCache1);
if ([NSObject shouldCleanUp])
{
DESTROY(certificateListLock);
DESTROY(certificateListCache);
DESTROY(credentialsLock);
DESTROY(credentialsCache);
DESTROY(fileLock);
DESTROY(fileMap);
DESTROY(paramsLock);
DESTROY(paramsCache);
DESTROY(privateKeyLock);
DESTROY(privateKeyCache0);
DESTROY(privateKeyCache1);
}
}
+ (NSData*) dataForTLSFile: (NSString*)fileName