Skip to content

Commit

Permalink
Targeting macOS 10.10 minimum required additional ARC fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fpillet committed Dec 29, 2018
1 parent c19af2b commit c7efa1b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 20 deletions.
14 changes: 4 additions & 10 deletions Desktop/Classes/LoggerConnection.m
Expand Up @@ -67,11 +67,6 @@ - (id)initWithAddress:(NSData *)anAddress
return self;
}

- (void)dealloc
{
dispatch_release(_messageProcessingQueue);
}

- (BOOL)isNewRunOfClient:(LoggerConnection *)aConnection
{
// Try to detect if a connection is a new run of an older, disconnected session
Expand Down Expand Up @@ -126,16 +121,16 @@ - (BOOL)isNewRunOfClient:(LoggerConnection *)aConnection
if (addrSize == sizeof(struct sockaddr_in))
{
struct sockaddr_in addra, addrb;
[_clientAddress getBytes:&addra];
[aConnection.clientAddress getBytes:&addrb];
[_clientAddress getBytes:&addra length:addrSize];
[aConnection.clientAddress getBytes:&addrb length:MIN([aConnection.clientAddress length], sizeof(addrb))];
if (memcmp(&addra.sin_addr, &addrb.sin_addr, sizeof(addra.sin_addr)))
return NO;
}
else if (addrSize == sizeof(struct sockaddr_in6))
{
struct sockaddr_in6 addr6a, addr6b;
[_clientAddress getBytes:&addr6a];
[aConnection.clientAddress getBytes:&addr6b];
[_clientAddress getBytes:&addr6a length:addrSize];
[aConnection.clientAddress getBytes:&addr6b length:MIN([aConnection.clientAddress length], sizeof(addr6b))];
if (memcmp(&addr6a.sin6_addr, &addr6b.sin6_addr, sizeof(addr6a.sin6_addr)))
return NO;
}
Expand Down Expand Up @@ -205,7 +200,6 @@ - (void)clearMessages
{
// Clear the backlog of _messages, only keeping the top (client info) message
// This MUST be called on the _messageProcessingQueue
assert(dispatch_get_current_queue() == _messageProcessingQueue);
if (![_messages count])
return;

Expand Down
2 changes: 1 addition & 1 deletion Desktop/Classes/LoggerDetailsWindowController.h
Expand Up @@ -35,7 +35,7 @@
@property (nonatomic, retain) IBOutlet NSTextView *detailsView;
@property (nonatomic, retain) IBOutlet NSTextField *detailsInfo;
@property (nonatomic, retain) IBOutlet NSProgressIndicator *progressIndicator;
@property (nonatomic, assign) dispatch_queue_t detailsQueue;
@property (nonatomic, retain) dispatch_queue_t detailsQueue;

- (void)setMessages:(NSArray *)messages;

Expand Down
4 changes: 2 additions & 2 deletions Desktop/Classes/LoggerWindowController.h
Expand Up @@ -82,8 +82,8 @@

@property (nonatomic, assign) CGFloat threadColumnWidth;

@property (nonatomic, assign) dispatch_queue_t messageFilteringQueue;
@property (nonatomic, assign) dispatch_group_t lastTilingGroup;
@property (nonatomic, retain) dispatch_queue_t messageFilteringQueue;
@property (nonatomic, retain) dispatch_group_t lastTilingGroup;

- (IBAction)openDetailsWindow:(id)sender;

Expand Down
5 changes: 0 additions & 5 deletions Desktop/Classes/LoggerWindowController.m
Expand Up @@ -90,9 +90,6 @@ - (void)dealloc
[_filterSetsListController removeObserver:self forKeyPath:@"arrangedObjects"];
[_filterSetsListController removeObserver:self forKeyPath:@"selectedObjects"];
[_filterListController removeObserver:self forKeyPath:@"selectedObjects"];
dispatch_release(_messageFilteringQueue);
if (_lastTilingGroup != NULL)
dispatch_release(_lastTilingGroup);

_logTable.delegate = nil;
_logTable.dataSource = nil;
Expand Down Expand Up @@ -273,7 +270,6 @@ - (void)cancelAsynchronousTiling
// by clearing the context, all further tasks on this group will cancel their work
// wait until they all went through cancellation before removing the group
dispatch_group_wait(leaveGroup, 0);
dispatch_release(leaveGroup);
});
}
_lastTilingGroup = NULL;
Expand Down Expand Up @@ -1085,7 +1081,6 @@ - (void)setAttachedConnection:(LoggerConnection *)aConnection
if (_lastTilingGroup != NULL)
{
dispatch_set_context(_lastTilingGroup, NULL);
dispatch_release(_lastTilingGroup);
_lastTilingGroup = NULL;
}

Expand Down
6 changes: 4 additions & 2 deletions Desktop/NSLoggerViewer.xcodeproj/project.pbxproj
Expand Up @@ -649,7 +649,7 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
DEVELOPMENT_TEAM = ETK7NXHU9M;
DEVELOPMENT_TEAM = K42G4S78CE;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/Third Party/HockeySDK-Mac\"",
Expand All @@ -661,6 +661,7 @@
HEADER_SEARCH_PATHS = "\"Third Party/BWToolkit\"";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = com.florentpillet.NSLogger;
PRODUCT_NAME = NSLogger;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -677,7 +678,7 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = ETK7NXHU9M;
DEVELOPMENT_TEAM = K42G4S78CE;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/Third Party/HockeySDK-Mac\"",
Expand All @@ -687,6 +688,7 @@
HEADER_SEARCH_PATHS = "\"Third Party/BWToolkit\"";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = com.florentpillet.NSLogger;
PRODUCT_NAME = NSLogger;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down

0 comments on commit c7efa1b

Please sign in to comment.