Misc leaks fixes.
parent
50326dfed8
commit
288c5cbee5
|
@ -266,6 +266,7 @@
|
|||
{
|
||||
if (nextStream == nil)
|
||||
{
|
||||
[newChain release];
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ addressForHost(NSString *hostname)
|
|||
}
|
||||
|
||||
buffer[bytesRead] = '\0';
|
||||
result = [[[NSString alloc] autorelease] initWithUTF8String:buffer];
|
||||
result = [[[NSString alloc] initWithUTF8String:buffer] autorelease];
|
||||
|
||||
} while(keepGoing);
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
ContainedNode *node = [[ContainedNode alloc] initWithDataSource:dataSource url:u];
|
||||
NSLog(@"Node: %@", u);
|
||||
[paths addObject:node];
|
||||
[node release];
|
||||
}
|
||||
|
||||
[self setSubpaths:paths];
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue