diff --git a/Audio/AudioPlayer.m b/Audio/AudioPlayer.m index 14942c176..7ca1823da 100644 --- a/Audio/AudioPlayer.m +++ b/Audio/AudioPlayer.m @@ -266,6 +266,7 @@ { if (nextStream == nil) { + [newChain release]; return YES; } diff --git a/AudioScrobbler/AudioScrobblerClient.m b/AudioScrobbler/AudioScrobblerClient.m index 7fd9936cb..b1b2e2765 100644 --- a/AudioScrobbler/AudioScrobblerClient.m +++ b/AudioScrobbler/AudioScrobblerClient.m @@ -137,7 +137,7 @@ addressForHost(NSString *hostname) } buffer[bytesRead] = '\0'; - result = [[[NSString alloc] autorelease] initWithUTF8String:buffer]; + result = [[[NSString alloc] initWithUTF8String:buffer] autorelease]; } while(keepGoing); diff --git a/FileTree/ContainerNode.m b/FileTree/ContainerNode.m index e1f2cb294..4d03bed5d 100644 --- a/FileTree/ContainerNode.m +++ b/FileTree/ContainerNode.m @@ -28,6 +28,7 @@ ContainedNode *node = [[ContainedNode alloc] initWithDataSource:dataSource url:u]; NSLog(@"Node: %@", u); [paths addObject:node]; + [node release]; } [self setSubpaths:paths]; diff --git a/Frameworks/Sparkle/NSString+extras.m b/Frameworks/Sparkle/NSString+extras.m index b5bfb4c6f..71da04dd8 100755 --- a/Frameworks/Sparkle/NSString+extras.m +++ b/Frameworks/Sparkle/NSString+extras.m @@ -72,7 +72,7 @@ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMA - (NSString *) ellipsizeAfterNWords: (int) n { NSArray *stringComponents = [self componentsSeparatedByString: @" "]; - NSMutableArray *componentsCopy = [stringComponents mutableCopy]; + NSMutableArray *componentsCopy = [[stringComponents mutableCopy] autorelease]; int ix = n; int len = [componentsCopy count]; diff --git a/Plugins/AudioOverload/AODecoder.m b/Plugins/AudioOverload/AODecoder.m index 42be97de8..fe4c7b1db 100644 --- a/Plugins/AudioOverload/AODecoder.m +++ b/Plugins/AudioOverload/AODecoder.m @@ -110,8 +110,11 @@ int ao_get_lib(char *fn, uint8 **buf, uint64 *length) NSString *key = [[NSString alloc] initWithUTF8String:info.title[i]]; NSString *value = [[NSString alloc] initWithUTF8String:info.info[i]]; - if (nil == key || nil == value) + if (nil == key || nil == value) { + [key release]; + [value release]; continue; + } if ([key hasPrefix:@"Name"]) { [dict setObject:value forKey:@"title"]; @@ -335,6 +338,7 @@ int ao_get_lib(char *fn, uint8 **buf, uint64 *length) AODecoder *decoder = [[self alloc] init]; if (![decoder openUnderLock:source]) { + [decoder release]; [globalLock unlock]; return nil; } diff --git a/Plugins/HTTPSource/Utils/HTTPConnection.m b/Plugins/HTTPSource/Utils/HTTPConnection.m index c7adb5076..867731992 100644 --- a/Plugins/HTTPSource/Utils/HTTPConnection.m +++ b/Plugins/HTTPSource/Utils/HTTPConnection.m @@ -208,6 +208,7 @@ // Send it off! NSInteger sent = [_socket send:requestBytes amount:requestLength]; if (sent != requestLength) { + [requestString release]; return NO; } NSLog(@"Sent:\n%@\n", requestString); diff --git a/Preferences/General/GeneralPreferencesPlugin.m b/Preferences/General/GeneralPreferencesPlugin.m index d760d1c99..df5ccc969 100644 --- a/Preferences/General/GeneralPreferencesPlugin.m +++ b/Preferences/General/GeneralPreferencesPlugin.m @@ -12,7 +12,7 @@ + (NSArray *)preferencePanes { - GeneralPreferencesPlugin *plugin = [[GeneralPreferencesPlugin alloc] init]; + GeneralPreferencesPlugin *plugin = [[[GeneralPreferencesPlugin alloc] init] autorelease]; [NSBundle loadNibNamed:@"Preferences" owner:plugin]; return [NSArray arrayWithObjects: diff --git a/Preferences/PreferencesController.m b/Preferences/PreferencesController.m index 2c4e92bf6..9c4ce489d 100644 --- a/Preferences/PreferencesController.m +++ b/Preferences/PreferencesController.m @@ -26,6 +26,7 @@ // Set which panes are included, and their order. //[prefs setPanesOrder:[NSArray arrayWithObjects:@"General", @"Updating", @"A Non-Existent Preference Pane", nil]]; + [pluginController release]; } // Show the preferences window. diff --git a/Spotlight/SpotlightWindowController.m b/Spotlight/SpotlightWindowController.m index a3e4c99d6..eb52502f4 100644 --- a/Spotlight/SpotlightWindowController.m +++ b/Spotlight/SpotlightWindowController.m @@ -61,16 +61,16 @@ static NSPredicate * musicOnlyPredicate = nil; self.query = [[[NSMetadataQuery alloc]init]autorelease]; [self.query setDelegate:self]; self.query.sortDescriptors = [NSArray arrayWithObjects: - [[NSSortDescriptor alloc]initWithKey:@"kMDItemAuthors" - ascending:YES - selector:@selector(compareFirstString:)], - [[NSSortDescriptor alloc]initWithKey:@"kMDItemAlbum" - ascending:YES - selector:@selector(caseInsensitiveCompare:)], - [[NSSortDescriptor alloc]initWithKey:@"kMDItemAudioTrackNumber" - ascending:YES - selector:@selector(compareTrackNumbers:)], - nil]; + [[[NSSortDescriptor alloc]initWithKey:@"kMDItemAuthors" + ascending:YES + selector:@selector(compareFirstString:)] autorelease], + [[[NSSortDescriptor alloc]initWithKey:@"kMDItemAlbum" + ascending:YES + selector:@selector(caseInsensitiveCompare:)] autorelease], + [[[NSSortDescriptor alloc]initWithKey:@"kMDItemAudioTrackNumber" + ascending:YES + selector:@selector(compareTrackNumbers:)] autorelease], + nil]; // hook my query transformer up to me [PausingQueryTransformer setSearchController:self]; diff --git a/ThirdParty/GCWindowMenu/GCOneShotEffectTimer.m b/ThirdParty/GCWindowMenu/GCOneShotEffectTimer.m index 122184220..8b05a8f57 100644 --- a/ThirdParty/GCWindowMenu/GCOneShotEffectTimer.m +++ b/ThirdParty/GCWindowMenu/GCOneShotEffectTimer.m @@ -33,7 +33,7 @@ // unlike the usual case, this is returned retained (by self, effectively). The one-shot releases // itself when it's complete - return ft; + return [ft autorelease]; } diff --git a/Utils/TrackingSlider.m b/Utils/TrackingSlider.m index 27dd6edac..0dcb01461 100644 --- a/Utils/TrackingSlider.m +++ b/Utils/TrackingSlider.m @@ -52,8 +52,8 @@ static NSString *TrackingSliderValueObservationContext = @"TrackingSliderValueOb NSDictionary *bindingsData = [NSDictionary dictionaryWithObjectsAndKeys: observableController, NSObservedObjectKey, - [keyPath copy], NSObservedKeyPathKey, - [options copy], NSOptionsKey, nil]; + [[keyPath copy] autorelease], NSObservedKeyPathKey, + [[options copy] autorelease], NSOptionsKey, nil]; [bindingInfo setObject:bindingsData forKey:binding]; }