using autorelease pool

This commit is contained in:
michael starke
2017-01-23 17:51:44 +01:00
parent 6f40e90dbc
commit e8d5e30142

View File

@@ -208,7 +208,10 @@ static CGKeyCode kMPFunctionKeyCodes[] = { kVK_F1, kVK_F2, kVK_F3, kVK_F4, kVK_F
} }
+ (void)appendObfuscatedPasteCommandForContent:(NSString *)pasteContent toCommands:(NSMutableArray *)commands { + (void)appendObfuscatedPasteCommandForContent:(NSString *)pasteContent toCommands:(NSMutableArray *)commands {
if(pasteContent) { if(!pasteContent) {
return;
}
@autoreleasepool {
/* /*
* obfuscate entered data using Two-Channel Auto-Type Obfuscation * obfuscate entered data using Two-Channel Auto-Type Obfuscation
@@ -217,8 +220,9 @@ static CGKeyCode kMPFunctionKeyCodes[] = { kVK_F1, kVK_F2, kVK_F3, kVK_F4, kVK_F
*/ */
NSString *paste = @""; NSString *paste = @"";
NSMutableArray *typeKeys = [NSMutableArray array];
NSMutableArray *modifiers = [NSMutableArray array]; NSMutableArray *typeKeys = [[NSMutableArray alloc] init];
NSMutableArray *modifiers = [[NSMutableArray alloc] init];
/* /*
* seed the random number generator using the first 4 bytes of the string's SHA1 * seed the random number generator using the first 4 bytes of the string's SHA1
@@ -291,7 +295,7 @@ static CGKeyCode kMPFunctionKeyCodes[] = { kVK_F1, kVK_F2, kVK_F3, kVK_F4, kVK_F
/* {PLUS}, {TILDE}, {PERCENT}, {+}, etc */ /* {PLUS}, {TILDE}, {PERCENT}, {+}, etc */
NSString *pasteConent = [self pasteableCommands][uppercaseCommand]; NSString *pasteConent = [self pasteableCommands][uppercaseCommand];
if(pasteConent) { if(pasteConent) {
[self appendAppropriatePasteCommandForEntry:entry withContent:pasteConent toCommands:commands]; [self appendAppropriatePasteCommandForEntry:entry withContent:pasteConent toCommands:commands];
return; // Done return; // Done
} }
@@ -408,4 +412,5 @@ static CGKeyCode kMPFunctionKeyCodes[] = { kVK_F1, kVK_F2, kVK_F3, kVK_F4, kVK_F
- (BOOL)isValid { - (BOOL)isValid {
return NO; // No valid command return NO; // No valid command
} }
@end @end