fixed some memory leaks found in the analyzer
This commit is contained in:
@@ -41,7 +41,6 @@
|
|||||||
[wagicDownloadController performSelectorInBackground: @selector(startDownload:) withObject:@"core"];
|
[wagicDownloadController performSelectorInBackground: @selector(startDownload:) withObject:@"core"];
|
||||||
|
|
||||||
[self.window addSubview: wagicDownloadController.view];
|
[self.window addSubview: wagicDownloadController.view];
|
||||||
[wagicDownloadController.view release];
|
|
||||||
[self.window makeKeyWindow];
|
[self.window makeKeyWindow];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -362,13 +362,14 @@ SYNTHESIZE_SINGLETON_FOR_CLASS(SoundManager);
|
|||||||
NSMutableArray *playlistTracks = [musicPlaylists objectForKey:aPlaylistName];
|
NSMutableArray *playlistTracks = [musicPlaylists objectForKey:aPlaylistName];
|
||||||
|
|
||||||
if (!playlistTracks) {
|
if (!playlistTracks) {
|
||||||
playlistTracks = [[NSMutableArray alloc] init];
|
playlistTracks = [NSMutableArray arrayWithCapacity: 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
[playlistTracks addObject:aTrackName];
|
[playlistTracks addObject:aTrackName];
|
||||||
|
|
||||||
// Add the track key to the play list
|
// Add the track key to the play list
|
||||||
[musicPlaylists setObject:playlistTracks forKey:aPlaylistName];
|
[musicPlaylists setObject:playlistTracks forKey:aPlaylistName];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)startPlaylistNamed:(NSString*)aPlaylistName {
|
- (void)startPlaylistNamed:(NSString*)aPlaylistName {
|
||||||
@@ -391,14 +392,15 @@ SYNTHESIZE_SINGLETON_FOR_CLASS(SoundManager);
|
|||||||
|
|
||||||
NSMutableArray *playlistTracks = [musicPlaylists objectForKey:aPlaylistName];
|
NSMutableArray *playlistTracks = [musicPlaylists objectForKey:aPlaylistName];
|
||||||
if (playlistTracks) {
|
if (playlistTracks) {
|
||||||
int indexToRemove;
|
int indexToRemove = -1;
|
||||||
for (int index=0; index < [currentPlaylistTracks count]; index++) {
|
for (NSUInteger index=0; index < [currentPlaylistTracks count]; index++) {
|
||||||
if ([[currentPlaylistTracks objectAtIndex:index] isEqualToString:aTrackName]) {
|
if ([[currentPlaylistTracks objectAtIndex:index] isEqualToString:aTrackName]) {
|
||||||
indexToRemove = index;
|
indexToRemove = index;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[currentPlaylistTracks removeObjectAtIndex:indexToRemove];
|
if (indexToRemove >= 0)
|
||||||
|
[currentPlaylistTracks removeObjectAtIndex:indexToRemove];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1156,7 +1156,7 @@ static NSOperationQueue *sharedQueue = nil;
|
|||||||
// Create the stream for the request
|
// Create the stream for the request
|
||||||
//
|
//
|
||||||
|
|
||||||
NSFileManager *fileManager = [[[NSFileManager alloc] init] autorelease];
|
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||||
|
|
||||||
[self setReadStreamIsScheduled:NO];
|
[self setReadStreamIsScheduled:NO];
|
||||||
|
|
||||||
@@ -1214,6 +1214,7 @@ static NSOperationQueue *sharedQueue = nil;
|
|||||||
CFReadStreamSetProperty((CFReadStreamRef)[self readStream],
|
CFReadStreamSetProperty((CFReadStreamRef)[self readStream],
|
||||||
kCFStreamPropertySSLSettings,
|
kCFStreamPropertySSLSettings,
|
||||||
(CFTypeRef)sslProperties);
|
(CFTypeRef)sslProperties);
|
||||||
|
[sslProperties release];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tell CFNetwork to use a client certificate
|
// Tell CFNetwork to use a client certificate
|
||||||
|
|||||||
Reference in New Issue
Block a user